• The theme I’m using for my site (book lite) doesn’t have widgetized areas available on the right and left sidebars (only in the footer). The theme itself has a slightly larger content/post area in the middle of the page, so the right and left sidebar areas are a little smaller than a typical theme. I really need to have widget areas available on these sides.

    I’ve done exactly what the codex has said to do for registering and adding widget areas. I added the code in my child theme’s functions.php and I also added the appropriate code to my parent theme’s sidebar-footer.php template (for my theme, there is no specific sidebar.php template, just two sidebar-footer.php templates that each have the same code – I’m not sure if this duplicate was an error of the theme developer). Because I did everything the codex said, a new “Home right sidebar” module has even been successfully added to my widgets panel in the dashboard. Unfortunately, when I add any widgets to this Home right sidebar, nothing shows up on my site.

    Could some please help me figure out how to successfully get widgets to show up on the sidebar?

    My site is http://thealfredhitchcock.com/ As you can probably tell, I’m a newbie to wordpress/php so gentle instructions would be greatly appreciated. Thank you for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ve done exactly what the codex has said to do for registering and adding widget areas.

    please post your code.

    Thread Starter azragsdale

    (@azragsdale)

    For my child theme’s functions.php, I added in the following code:
    <?php
    function arphabet_widgets_init() {
    register_sidebar( array(
    ‘name’ => ‘Home right sidebar’,
    ‘id’ => ‘home_right_1’,
    ‘before_widget’ => ‘<div>’,
    ‘after_widget’ => ‘</div>’,
    ‘before_title’ => ‘<h2 class=”rounded”>’,
    ‘after_title’ => ‘</h2>’,
    ) );
    }
    add_action( ‘widgets_init’, ‘arphabet_widgets_init’ ); ?>

    For the parent theme’s sidebar-footer.php templates, I added:
    <?php
    if ( dynamic_sidebar(‘example_widget_area_name’) ) : else : endif; ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding sidebar widget areas to book lite theme’ is closed to new replies.