Support » Plugin: Simple Page Sidebars » [Plugin: Simple Page Sidebars] Widget not showing

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Brady Vercher

    (@bradyvercher)

    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

    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:

    <?php
    if ( function_exists(‘register_sidebar’) )
    register_sidebar();
    add_theme_support( ‘post-thumbnails’ );
    ?>`

    Is this correct?

    Plugin Author Brady Vercher

    (@bradyvercher)

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

    First, register your sidebar in functions.php:

    <?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

    You’re awesome! That worked!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Simple Page Sidebars] Widget not showing’ is closed to new replies.