WordPress.org

Ready to get started?Download WordPress

Forums

Unable to activate Widgets using Widget Sidebar instructions (1 post)

  1. tonyzeoli
    Member
    Posted 6 years ago #

    I can't get the sidebar widgets to work. Am doing something wrong?

    Here is my new Sidebar code after following the <div> instructions on the Automatic web site.

    I also added the functions.php to the WordPress folder on the server, using this:

    <?php
    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="title">',
            'after_title' => '</div>',
        ));
    ?>

    Here is my code:

    <div id="sidebar">
    
    <?php if ( !function_exists('dynamic_sidebar')
            || !dynamic_sidebar() ) : ?>
    
    	<center>
    	<?php include (TEMPLATEPATH . '/searchform.php'); ?></center>
    		<div id="side1">
    		<ul>
    
    			<li><h2>About Fiona bloom</h2>
    <a href="http://www.thebloomeffect.com/bio.html">
    <img src="http://thebloomeffect.com/blog/wp-content/themes/bloomeffect/images/girl2.jpg" border=0 class="left" alt="bio" /></a>
    			<p>International Marketer, World Citizen, Connector, Producer</p>
    			<p>A beautiful little girl with big blue eyes hailing from London, England dreams of becoming a concert pianist at the age of 5.  After years of prodigous finger duets with the ivory keys she was accepted into the highly reputable Royal Academy of Music in London.  From there her triple thirds, trills and thundering technique garnered two full prestigious scholarships; one at the University of the Arts in Philadelphia, and the other at the University of Maryland.  She also received a distinguished Steinway Piano Award.  While pursuing studies of classical music she was soon attracted to the sounds of two turntables and a microphone.  Hip-hop music had bounced into the room and Fiona was all ears.</p>
    			<img src="http://thebloomeffect.com/blog/wp-content/themes/bloomeffect/images/dots2.gif" alt="dots" />
    
    			</li>
    
    			<!--<li><a href="feed:<?php bloginfo('rss2_url'); ?>">Subscribe to my blog feed! (RSS)</a></li>-->
    
    <li><a href="http://feeds.feedburner.com/thebloomeffect/lTVm"><img src="http://www.thebloomeffect.com/blog/wp-content/themes/bloomeffect/images/bloomeffect_rss.png"></a></li>
    
    <li><a href="feed:<?php bloginfo('comments_rss2_url'); ?>">Keep up with all the latest Bloom Buzz (Comments RSS)</a></li>
    			<li><strong><a href="http://www.thebloomeffect.com/">Need more?  Check out my website for more info on THE BLOOM EFFECT</a></strong></li>
    
    </ul>
    
    <div align="center"><script type="text/javascript"><!--
    google_ad_client = "pub-9181295049723670";
    /* bloom_sidebar_300x250 */
    google_ad_slot = "3394815150";
    google_ad_width = 300;
    google_ad_height = 250;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    </div>
    
    <ul>
    
    			<li><?php wp_list_bookmarks(); ?></li>
    			<li>
    			<?php /* If this is a 404 page */ if (is_404()) { ?>
    			<?php /* If this is a category archive */ } elseif (is_category()) { ?>
    			<p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>
    
    			<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
    			<p>You are currently browsing the <a href="<?php bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives
    			for the day <?php the_time('l, F jS, Y'); ?>.</p>
    
    			<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    			<p>You are currently browsing the <a href="<?php bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives
    			for <?php the_time('F, Y'); ?>.</p>
    
          <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    			<p>You are currently browsing the <a href="<?php bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives
    			for the year <?php the_time('Y'); ?>.</p>
    
    		 <?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
    			<p>You have searched the <a href="<?php echo bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives
    			for <strong>'<?php echo wp_specialchars($s); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
    
    			<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    			<p>You are currently browsing the <a href="<?php echo bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives.</p>
    
    			<?php } ?>
    			</li>
    
    			<li><h2>Archives</h2>
    				<ul>
    				<?php wp_get_archives('type=monthly'); ?>
    				</ul>
    			</li>
    
    			<li><h2>Categories</h2>
    				<ul>
    				<?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
    				</ul>
    			</li>
    
    			<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
    
    			<?php } ?>
    
    		</ul>
    
    <div align="center"
    
    <script type="text/javascript"><!--
    google_ad_client = "pub-9181295049723670";
    /* bloom_sidebar_160x600 */
    google_ad_slot = "3646904902";
    google_ad_width = 160;
    google_ad_height = 600;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    
    </div>
    	</div>
    <?php endif; ?>
    	</div>

Topic Closed

This topic has been closed to new replies.

About this Topic