Simple Page Specific Sidebars
[resolved] This might help someone (3 posts)

  1. tegansnyder
    Posted 3 years ago #

    In order to get this to work with my theme I had to modify my themes sidebar.php file to look like this:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    $is_custom = get_post_meta($post->ID, 'is_custom', true );
    if( $is_custom == 'y'){
    	dynamic_sidebar('page-sidebar-' . $post->ID);
    } else {

    I'm using the Roots theme: http://www.rootstheme.com/


  2. ivycat
    Plugin Author

    Posted 2 years ago #

    Seriously cool comment, Tegan. Thanks!

    We use Roots quite a bit and will work on making this plugin work automatically without having to do anything special.


  3. Daniel Gilfoy
    Plugin Contributor

    Posted 2 years ago #

    Hell tegan,

    Every theme (and even themes with different versions) names their default sidebar something different. Since this plugin overwrites the old sidebar with the new, depending upon the page, it needs the sidebar slug to work.

    I actually developed this plugin on a dev site using the roots theme. It was an older version, pre-bootstrap even, and so the default was using that slug. To be compatible with other themes (I couldn't find a way to programatically detect the primary slug) I added a settings page where you can enter in your primary slug.

    For instance, I noticed on a newer (not sure if newest) version of roots, the primary sidebar is called roots-sidebar. I added this and it worked.

    You can still add this to the theme's sidebar file still, that of course does work too.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Page Specific Sidebars
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.