added new widget area. renamed general widget areas. aplly general widget areas to page templates
This commit is contained in:
parent
db32cad184
commit
3ad6632cc6
|
@ -7,7 +7,7 @@
|
|||
function xarxaprod_widgets_init() {
|
||||
register_sidebar(
|
||||
array(
|
||||
'name' => esc_html__( 'Front Page - principal', 'xarxaprod' ),
|
||||
'name' => esc_html__( 'Front Page - Despres del contingut a la Pagina principal', 'xarxaprod' ),
|
||||
'id' => 'front-page-widgets',
|
||||
'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ),
|
||||
'before_widget' => '<section id="%1$s" class="widget %2$s">',
|
||||
|
@ -18,8 +18,8 @@
|
|||
);
|
||||
register_sidebar(
|
||||
array(
|
||||
'name' => esc_html__( 'Sidebar funds - Lateral ajuts', 'xarxaprod' ),
|
||||
'id' => 'sidebar-funds',
|
||||
'name' => esc_html__( 'After content - Despres del contingut i abans del peu. A tota la web.', 'xarxaprod' ),
|
||||
'id' => 'after-content',
|
||||
'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ),
|
||||
'before_widget' => '<section id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => '</section>',
|
||||
|
@ -29,7 +29,18 @@
|
|||
);
|
||||
register_sidebar(
|
||||
array(
|
||||
'name' => esc_html__( 'Footer - Peu', 'xarxaprod' ),
|
||||
'name' => esc_html__( 'After Associats - Despres del contingut als Espais Associats i abans del peu', 'xarxaprod' ),
|
||||
'id' => 'after-content-members',
|
||||
'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ),
|
||||
'before_widget' => '<section id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => '</section>',
|
||||
'before_title' => '<h2 class="widget-title">',
|
||||
'after_title' => '</h2>',
|
||||
)
|
||||
);
|
||||
register_sidebar(
|
||||
array(
|
||||
'name' => esc_html__( 'Footer - Peu de página', 'xarxaprod' ),
|
||||
'id' => 'footer-widgets',
|
||||
'description' => esc_html__( 'Add widgets here.', 'xarxaprod' ),
|
||||
'before_widget' => '<section id="%1$s" class="widget %2$s">',
|
||||
|
|
|
@ -88,6 +88,15 @@ get_header();
|
|||
</section>
|
||||
|
||||
</main><!-- #main -->
|
||||
<?php
|
||||
if ( ! is_active_sidebar( 'after-content-members' ) ) {
|
||||
return;
|
||||
} else {?>
|
||||
<aside id="secondary" class="widget-area widget-area-members">
|
||||
<?php dynamic_sidebar( 'after-content-members' ); ?>
|
||||
</aside><!-- #secondary -->
|
||||
<?php }; //end else ?>
|
||||
|
||||
<?php
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
|
|
@ -73,4 +73,5 @@ get_header();
|
|||
</main><!-- #main -->
|
||||
|
||||
<?php
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
|
6
page.php
6
page.php
|
@ -27,13 +27,13 @@ get_header();
|
|||
endif; // End if have_post.
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ( is_front_page() ) :
|
||||
<?php
|
||||
if ( is_front_page() ) :
|
||||
//get_template_part( 'template-parts/section', 'featured' );
|
||||
get_template_part( 'template-parts/section', 'last-convos' );
|
||||
get_template_part( 'template-parts/section', 'agenda' );
|
||||
endif;
|
||||
?>
|
||||
?>
|
||||
|
||||
|
||||
</main><!-- #main -->
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
* @package Xarxaprod_theme
|
||||
*/
|
||||
|
||||
if ( ! is_active_sidebar( 'sidebar-funds' ) ) {
|
||||
if ( ! is_active_sidebar( 'after-content' ) ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<aside id="secondary" class="widget-area">
|
||||
<?php dynamic_sidebar( 'sidebar-funds' ); ?>
|
||||
<?php dynamic_sidebar( 'after-content' ); ?>
|
||||
</aside><!-- #secondary -->
|
||||
|
|
Loading…
Reference in New Issue