• Hi there,

    I’m currently making a new site for a family member. Basically, one of the pages is the blog page, and on the right hand side of that page (secondary widget area) they asked for a ‘recent posts’ widget. At the moment I have that up there perfectly but it’s on every single page, how do i make it only appear on the posts/blog page?

    I’m using the TwentyThirteen Theme by the way.

    Thank you, Joe.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Joe!

    There’s a few different ways we can go about eliminating widgets in the sidebar on non-blog pages, one of which is to remove or comment out the call to the sidebar <?php get_sidebar(); ?> at the bottom of your page.php template file. Another method would be to create a custom page template, where the sidebar is removed, while leaving the ‘original’ page code intact. This way you could simply decide to include the sidebar or not for each specific page, as you create them. You can find out how to do that here.

    Just in case you are not using one, to make changes to the code (for css and php files) it is recommended to use a child theme – you can find out how to to that here.

    Hope this helps!

    Thread Starter jaywin91

    (@jaywin91)

    Thanks redrambles! taking out ‘get_sidebar’ worked along with editing the css to make it all fit nicely. I appreciate the help a lot.

    Glad that did the trick! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do I add the secondary widget area to one page only?’ is closed to new replies.