• Hey, I tried posting this before but didnt get any help – my sidebar is supposed to be widgetized, but no widgets I add actually show up. Can anyone help me? The code for the sidebar is

    <?php
    /**
     * @package WordPress
     * @subpackage Classic_Theme
     */
    ?>
    <!-- begin sidebar -->
    <div id="menu">
    
    <ul>
    <?php 	/* Widgetized sidebar, if you have the plugin installed. */
    		if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    	<?php wp_list_pages('title_li=' . __('Pages:')); ?>
    	<?php wp_list_bookmarks('title_after=&title_before='); ?>
    	<?php wp_list_categories('title_li=' . __('Categories:')); ?>
     <li id="search">
       <label for="s"><?php _e('Search:'); ?></label>
       <form id="searchform" method="get" action="<?php bloginfo('home'); ?>">
    	<div>
    		<input type="text" name="s" id="s" size="15" /><br />
    		<input type="submit" value="<?php esc_attr_e('Search'); ?>" />
    	</div>
    	</form>
     </li>
     <li id="archives"><?php _e('Archives:'); ?>
    	<ul>
    	 <?php wp_get_archives('type=monthly'); ?>
    	</ul>
     </li>
     <li id="meta"><?php _e('Meta:'); ?>
    	<ul>
    		<?php wp_register(); ?>
    		<li><?php wp_loginout(); ?></li>
    		<li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><?php _e('<abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
    		<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php _e('The latest comments to all posts in RSS'); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
    		<li><a href="http://validator.w3.org/check/referer" title="<?php _e('This page validates as XHTML 1.0 Transitional'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>'); ?></a></li>
    		<li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
    		<li><a href="http://wordpress.org/" title="<?php _e('Powered by WordPress, state-of-the-art semantic personal publishing platform.'); ?>"><abbr title="WordPress">WP</abbr></a></li>
    		<?php wp_meta(); ?>
    	</ul>
     </li>
    <?php endif; ?>
    
    </ul>
    
    </div>
    <!-- end sidebar -->

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter hayenna

    (@hayenna)

    Oh, and the webside is http://www.beaujes.com

    What do you have in your functions.php file in relation to registering dynamic sidebars?

    Thread Starter hayenna

    (@hayenna)

    This is in the functions.php file. Thanks so much for helping me out – trying to fix this site for a friend and I just got stuck

    <?php
    /**
     * @package WordPress
     * @subpackage Classic_Theme
     */
    
    automatic_feed_links();
    
    if ( function_exists('register_sidebar') )
    	register_sidebar(array(
    		'before_widget' => '<li id="%1$s" class="widget %2$s">',
    		'after_widget' => '</li>',
    		'before_title' => '',
    		'after_title' => '',
    	));
    
    ?>

    Try the following, this is the standard code in the Classic theme function.php file:

    <?php
    /**
    * @package WordPress
    * @subpackage Classic_Theme
    */

    add_theme_support( ‘automatic-feed-links’ );

    if ( function_exists(‘register_sidebar’) )
    register_sidebar(array(
    ‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’,
    ‘after_widget’ => ”,
    ‘before_title’ => ”,
    ‘after_title’ => ”,
    ));

    ?>

    Notice that your automatic_feed_links(); is different to add_theme_support( ‘automatic-feed-links’ );

    See if that works.

    Thread Starter hayenna

    (@hayenna)

    alright, I did make that change – but still, no widgets showing up in the sidebar. In fact, nothing changed.

    Hm, maybe I should have had a look at your site first :o) Do you have <?php get_sidebar(); ?> anywhere in your files? Because you are using the Classic Theme it should be in the footer.php but check in the index.php also.

    Thread Starter hayenna

    (@hayenna)

    Yeah, I am not using the classic theme though – she had someone make a customize theme for her. But I think I figured out what the problem is – what I thought was a sidebar is in fact a footer that goes up along the side of the webpage. Urgh. Well, I guess I need to start all over in my planning then. 🙂 Thanks.

    Well it does appear that the Classic Theme was used as a basis to create a child theme and with the Classic Theme the sidebar is called in the footer.php file unlike most other themes that call it in the index.php file. However if the proper php call for the get_sidebar is there it should call the dynamic sidebar.

    I did try changing the Classic theme myself some time back and had to move the get_sidebar function to the index.php file.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Widgetized sidebar doesnt work!’ is closed to new replies.