WordPress.org

Ready to get started?Download WordPress

Forums

Sidebar Widgets Not Displaying (3 posts)

  1. adamj3333
    Member
    Posted 1 year ago #

    I have been banging my head against a wall trying to figure this out. For some reason my widgets are not displaying in my sidebar. I believe I have everything correct.

    http://bsullivan.com/sullivan-advantage/

    Here's what I have in my functions file:

    if ( function_exists('register_sidebar') ) {
    register_sidebar(array(
    'name' => 'sidebar-new',
    'id' => 'sidebar-new',
    'description' => 'Appears as the sidebar on the pages',
    'before_widget' => '<div style="height: 280px"></div><li id="%1$s" class="widget %2$s">',
    'after_widget' => '</li>',
    'before_title' => '<h2 class="widgettitle">',
    'after_title' => '</h2>',
    ));

    Here's what is in my sidebar file:

    <div id="sidebar">
       <ul>
          <?php
          if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('new-sidebar') ) :
          endif; ?>
       </ul>
    </div>

    And in my pages theme file:

    <div id="pagecontent">
    		<div class="padding">
    
    			<?php get_sidebar('left'); ?>
    
    			<?php $centerWidth = (!has_post_thumbnail()) ? " style=\"width: 630px;\"" : ''; ?>
    
    			<div class="center"<?php// echo $centerWidth; ?>>
    				<div class="breadcrumb">
    					<?php
    	                if(function_exists('bcn_display'))
    	                {
    	                    bcn_display();
    	                }
    	                ?>
    	            </div>
    
    				<?php
    				// action hook for placing content above the index loop
                	thematic_above_indexloop();
    
                	// action hook creating the index loop
                	thematic_indexloop();
    
                	// action hook for placing content below the index loop
                	thematic_below_indexloop();
    
    				?>
    
    				<?php //edit_post_link( __( 'Edit', 'sandbox' ), '<span class="edit-link">', '</span>' ) ?>
    			</div>
    
    			<?php get_sidebar('new'); ?>
    
    			<div class="clr"></div>
    
    		</div>
    
    		<div class="clr"></div>
    	</div>
    
    <?php 
    
        // action hook for placing content below #container
        thematic_belowcontainer();
    
        // calling the standard sidebar
        //thematic_sidebar();
    
        // calling footer.php
        get_footer();
    
    ?>

    Any help would be GREATLY appreciated.

  2. Tara
    Member
    Posted 1 year ago #

    - which theme are you working with?

    - Is it a Widget ready theme?

  3. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    'sidebar-new' or 'new-sidebar' ?

    you register:

    'name' => 'sidebar-new',
    'id' => 'sidebar-new',

    but you call:
    !dynamic_sidebar('new-sidebar')

    hopefully, your sidebar file is called sidebar-new.php

    ps:
    while you are working on the site, also check teh validation errors:
    http://validator.w3.org/check?uri=http%3A%2F%2Fbsullivan.com%2Fsullivan-advantage%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

    http://codex.wordpress.org/Validating_a_Website

Topic Closed

This topic has been closed to new replies.

About this Topic