WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Widget Problems (7 posts)

  1. chaseblackwell44
    Member
    Posted 4 years ago #

    Hey, I'm having a problem with getting my Widgets to show up on my web page. I'm able to drag and drop them to my sidebar, but when I refresh my webpage nothing has changed.

    For instance, in my Dashboard, I have:
    - Flickr
    - Categories
    - Recent Posts
    - Etc.

    On my webpage:
    - Pages
    - Archives
    - Blog roll
    - Meta
    - Etc.

    Any reason why this would be happening?

    http://chaseblackwell.com

  2. kz
    Member
    Posted 4 years ago #

    I think your theme not support dynamic sidebar.
    Try this into sidebar.php

    <div id="sidebar">
    <ul>
    <?php if(!function_exists('dynamic_sidebar') || !dynamic_sidebar()) : ?>
      /* write here original sidebar contents, or keep nothing */
    <?php endif; ?>
    </ul>
    </div>
  3. chaseblackwell44
    Member
    Posted 4 years ago #

    Okay, that definitely worked. However, the old stuff is still there and the new sidebar is in the wrong place. Any idea how to solve this?

    BTW, I wrote "keep nothing" and it didn't change anything.

  4. kz
    Member
    Posted 4 years ago #

    the old stuff is still there

    Because you dont remove the code that output the old stuff.

    /* write here original sidebar contents,
    means:
    If you want to show the old stuff when no widgets are specified,
    replace '/* write here original sidebar contents, or keep nothing */' with the code that output the old stuff.

    or keep nothing */
    means:
    If you DONT want to show the old stuff anyway,
    delete '/* write here original sidebar contents, or keep nothing */' or dont edit the comment.

    If you are confused, pls show your sidebar.php. I will fix it.

  5. chaseblackwell44
    Member
    Posted 4 years ago #

    Still confused and can't get it to work... Here is my sidebar.php

    <div id="sidebar">
    		<ul>
    
    			<?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>
    
    			<li><h2>Archives</h2>
    				<ul>
    				<?php wp_get_archives('type=monthly'); ?>
    				</ul>
    			</li>
    
    			<?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?>
    
    			<?php if ( is_home() || is_page() ) { ?>
    				<?php wp_list_bookmarks(); ?>
    
    				<li><h2>Meta</h2>
    				<ul>
    					<?php wp_register(); ?>
    					<li><?php wp_loginout(); ?></li>
    					<li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li>
    					<?php wp_meta(); ?>
    				</ul>
    				</li>
    			<?php } ?>
    
    		</ul>
    		<? $sg = 'banner'; include "templates.php";?>
    	</div>
    
    <div id="sidebar">
    <ul>
    <?php if(!function_exists('dynamic_sidebar') || !dynamic_sidebar()) : ?> keep nothing
    <?php endif; ?>
    </ul>
    </div>

    Thanks for your help.

  6. kz
    Member
    Posted 4 years ago #

    This code will work fine for you:

    <div id="sidebar">
      <ul>
        <?php if(!function_exists('dynamic_sidebar') || !dynamic_sidebar()) : ?>
        <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>
        <li><h2>Archives</h2>
          <ul>
            <?php wp_get_archives('type=monthly'); ?>
          </ul>
        </li>
        <?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?>
        <?php if ( is_home() || is_page() ) { ?>
        <?php wp_list_bookmarks(); ?>
        <li><h2>Meta</h2>
          <ul>
            <?php wp_register(); ?>
            <li><?php wp_loginout(); ?></li>
            <li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li>
            <?php wp_meta(); ?>
          </ul>
        </li>
        <?php } ?>
        <?php endif; ?>
      </ul>
      <? $sg = 'banner'; include "templates.php";?>
    </div>
  7. chaseblackwell44
    Member
    Posted 4 years ago #

    Great! Thanks kz!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.