• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Force sidebar for search page and post category page

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Force sidebar for search page and post category page

This topic is: resolved

Tagged: archive page sidebar, force sidebar, Search Form

  • This topic has 5 replies, 2 voices, and was last updated 9 years, 4 months ago by Jumpringer.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • November 26, 2013 at 9:40 am #75703
    Jumpringer
    Member

    I'm using the Simple Sidebars plugin and old "Agency" theme.

    The sidebars that display on the "search", "archive" page, and page that displays when "Blog" menu is clicked display the wrong sidebar(s). The sidebar on the individual blog posts are correct.

    Some possible solutions might be conditional code on the functions.php, or the plug-in "Genesis Layout Extras".

    I'd appreciate if someone can point me in the right direction or to a link with some more explanation.

    Thanks.

    http://jumpgraphix.com/stage/dev/catzen_forensic/content/?page_id=11
    November 26, 2013 at 9:59 am #75705
    Jumpringer
    Member

    note - just installed the plugin "widget context" - having some success, but not sure this is the solution.

    November 26, 2013 at 10:19 am #75707
    Brad Dalton
    Participant

    You can conditionally force a layout http://wpsites.net/web-design/change-layout-genesis/


    Tutorials for StudioPress Themes.

    November 26, 2013 at 3:00 pm #75748
    Jumpringer
    Member

    Thanks, Brad.

    Using the plugin WP Context, I had success, except with this:

    Still can't force sidebar display on my site's page11 (?page_id=11). This is a page that contains the blog list.

    Here's my code, which doesn't work. Page 11 displays the default sidebar, instead of the sidebar I named "category".

    function category(){
    if(is_page ('11') ){
    get_sidebar('category');
    }
    }

    Suggestions?

    November 27, 2013 at 2:25 am #75822
    Brad Dalton
    Participant

    Is the plugin active?

    The code i linked to is tested and works but generally, code doesn't work if you have a plugin installed to do the same thing.


    Tutorials for StudioPress Themes.

    November 27, 2013 at 10:09 am #75883
    Jumpringer
    Member

    Brad,

    I took the easy way out:

    deleted the WP context plugin, made my "Category sidebar" the default sidebar, and reset the other pages to new sidebars.

    Now it is working and sidebars are displaying as designed.

    Thanks for your help, and Happy Thanksgiving.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Force sidebar for search page and post category page’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble