Support » Fixing WordPress » TwentyThirteen Posts Page Problem

  • I made a child theme in twentythirteen. In settings I set up a static page for the front page and selected “news” as my posts page.

    I’ve declared a sidebar in functions called “news”.

    register_sidebar( array(
                    'name' => __( 'news', 'twentythirteen' ),
                    'id' => 'news',
                    'description' => __( 'news sidebar', 'twentythirteen' ),
                    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
                    'after_widget' => "</aside>",
                    'before_title' => '<h3 class="widget-title">',
                    'after_title' => '</h3>',
            ) );

    I need to know how to call that sidebar on only my “news” page. I tried to setup a page template and use

    <div id="content-right">
            	<!-- Add .news to blog layouts -->
    			<div id="news" class="widget-area" role="complementary">
        			<?php if ( ! dynamic_sidebar( 'news' ) ) : ?>
        			<?php endif; // end extra sidebar widget area ?>
    			</div><!-- .extra-sidebar .widget-area -->
            </div>

    But that isn’t adding anything to my page. Help would be appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘TwentyThirteen Posts Page Problem’ is closed to new replies.