WordPress.org

Support

Support » Themes and Templates » [Resolved] Need sidebar on post, but not on custom posts

[Resolved] Need sidebar on post, but not on custom posts

  • Using a Twenty Eleven child theme that supports 2 custom post types. Would like the “blog” page to have a sidebar that shows categories and tags. The 2 custom post pages have their own taxonomies and do not need a sidebar with the blog page’s categories and tags.

    In Theme Options’ default layout, if I select One-column, no sidebar, then the blog page obviously has no sidebar; if I select Content on left, then the custom post pages have the sidebar.

    What mods do I need to do to have a sidebar for the blog page and no sidebars for the custom post pages and the other static pages?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Follow up question regarding my first post:

    The child theme folder already has single.php, was wondering if that file should be modified and/or do I place Twenty Eleven’s sidebar-page.php and/or sidebar.php into the child theme folder and make mods to those files to allow the sidebar display only for blog pages?

    Just don’t know what variables/functions to add, modify, etc.

    Watching lynda.com’s Building Child Themes clued me in on a possible solution. Moved sidebar.php into the child theme folder and tested for the post type of ‘post’ above the <div> statement.

    Probably a kluge fix, but my blog, custom posts and pages are displaying like I want them.

    I should thank me for figuring this out 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Need sidebar on post, but not on custom posts’ is closed to new replies.