WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Sidebar Issues (Widgets) (3 posts)

  1. submo6
    Member
    Posted 6 years ago #

    I am trying to edit a theme and the widgets are not working. In the admin panel it says "No Sidebars Defined" Though my sidebars look basically identical to the ones in the tutorial at - http://automattic.com/code/widgets/themes/ -

    Can anyone help me out?

    This is what the sidebar code is, and the theme I am trying to use is - http://www.am-fem.com/demo/

    I am also using wordpress 2.5

    <div id="sidebar">
    		<ul>
    
    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar() ) : else : ?>
    
    	<li id="search">
    		<?php include(TEMPLATEPATH . '/searchform.php'); ?>
    	</li>
    
    	<li id="calendar"><h2><?php _e('Calendar'); ?></h2>
    		<?php get_calendar(); ?>
    	</li>
    
    	<?php wp_list_pages('depth=3&title_li=<h2>Pages</h2>'); ?>
    
    	<li><h2><?php _e('Categories'); ?></h2>
    		<ul>
    			<?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
    		</ul>
    	</li>
    
    	<li><h2><?php _e('Archives'); ?></h2>
    		<ul>
    			<?php wp_get_archives('type=monthly'); ?>
    		</ul>
    	</li>
    
    	<?php get_links_list(); ?>
    
    	<li><h2><?php _e('Meta'); ?></h2>
    		<ul>
    			<?php wp_register(); ?>
    			<li><?php wp_loginout(); ?></li>
    			<?php wp_meta(); ?>
    		</ul>
    	</li>
    
    <?php endif; ?> 
    
    </ul>
    
    	</div>
  2. psyphil
    Member
    Posted 6 years ago #

    Put a functions.php file to your theme folder

    With the content

    <?php

    if ( function_exists('register_sidebar') )
    register_sidebar();

    if ( function_exists('register_sidebar') )
    register_sidebar(array(
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<div class="widget-title">',
    'after_title' => '</div>',
    ));

    ?>

    This may help You. BTW quotes on Daydreamz are awesome.

  3. submo6
    Member
    Posted 6 years ago #

    Thank you so much for your help! It worked!!

    For the quotes on my blog I found them around the internet. Just good simple quotes to live by in life, inspirational, motivational type. I am using the "Random Quotes" Plugin.

Topic Closed

This topic has been closed to new replies.

About this Topic