Simple Page Sidebars
[resolved] Widget not showing (5 posts)

  1. isign4jc
    Posted 4 years ago #

    So I thought I followed all the proper instructions for setting up my functions.php and sidebars.php files. However, after installing your plugin and activating it, I do not see anything in the sidebars. This website is not even live yet, so excuse the mess until the content arrives. Here is the link: http://www.sladeresearch.com/index.php/intelligent-change/

    Any help is appreciated.



  2. Brady Vercher
    Plugin Author

    Posted 4 years ago #

    Hi isign4jc, in most cases, you don't actually need to make any changes to functions.php or sidebars.php to get this to work. I can't debug much just from looking at the front-end of your site; what exactly have you tried so far?

    - Brady

  3. isign4jc
    Posted 4 years ago #

    The theme I am working with is my own custom theme. This is what I have in my sidebar.php file, which multiple page templates are using: ` <?php if (function_exists('dynamic_sidebar')) ?>

    This what is in my functions.php file:
    if ( function_exists('register_sidebar') )
    add_theme_support( 'post-thumbnails' );

    Is this correct?

  4. Brady Vercher
    Plugin Author

    Posted 4 years ago #

    Not sure if your code got clipped, but that doesn't look right.

    First, register your sidebar in functions.php:

    register_sidebar( array(
    	'name' => 'Default Sidebar',
    	'id' => 'sidebar-1',
    	'description' => 'This is the default sidebar.',
    	'before_widget' => '<div id="%1$s" class="widget %2$s">',
    	'after_widget' => '</div>',
    	'before_title' => '<h4 class="title">',
    	'after_title' => '</h4>',
    ) );

    Then you call the registered sidebar in sidebar.php:

    <?php dynamic_sidebar( 'Default Sidebar' ); ?>

    The function_exists checks aren't needed; they're mainly used in themes being released for backwards compatibility when new features are added.

    Once you have the code in the correct places, you should see the "Default Sidebar" on your Widgets screen in the admin panel. Then any sidebars you create with the plugin will override the default sidebar without having to make any additional changes to your code.

    Let me know if that helps.

    - Brady

  5. isign4jc
    Posted 4 years ago #

    You're awesome! That worked!

Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic


No tags yet.