Support » Fixing WordPress » TwentyThirteen Posts Page Problem
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.
-
While there are multiple solutions to this, I’ve used the Custom Sidebars plugin before with great results.
Check it out – https://wordpress.org/plugins/custom-sidebars/
Tried that and widget logic on the main sidebar and I can’t get either to show up on the “news” page. That’s why I thought adding html to page template would be able to accomplish this. Still can’t find a solution.
Wanted to follow up and see if anyone had any advice to fix this issue I’m having. I’m still not being able to get a sidebar to appear on my blog page.
the ‘posts page’ does not use a page template, but uses either index.php or home.php – in Twenty Thirteen is would use index.php.
http://codex.wordpress.org/Creating_a_Static_Front_Page
http://codex.wordpress.org/Template_Hierarchytry to create a home.php with your edits…
- The topic ‘TwentyThirteen Posts Page Problem’ is closed to new replies.