Title: Dynamic Sidebar Customization
Last modified: August 19, 2016

---

# Dynamic Sidebar Customization

 *  [feeprinzessin](https://wordpress.org/support/users/feeprinzessin/)
 * (@feeprinzessin)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/dynamic-sidebar-customization/)
 * I’m using the wordpress theme black tec. The dynamic sidebar on the right is 
   not working properly.
 * I can still add and take away widgets, but the two headings, blogroll, and categories,
   will not go away no matter how I have my widgets set up. How do I make my sidebar
   blank so I can customize it with widgets to fit my needs?
 * sidebar.php
 *     ```
       <!-- Sidebar -->
       		<div class="sidebar">
   
       			<h3>Pages</h3>
       			<ul>
       				<?php wp_list_pages('title_li='); ?>
       			</ul>
   
       			<h3>Archives</h3>
       			<ul>
       				<?php wp_get_archives('type=monthly'); ?>
       			</ul>
   
       			<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?>
   
       			<?php endif; ?>
   
       		</div>
       		<!-- Sidebar -->
       ```
   
 * functions.php
 *     ```
       <?php
       if ( function_exists('register_sidebar') )
           register_sidebar(array(
           	'name' => 'Sidebar Left',
               'before_widget' => '',
               'after_widget' => '',
               'before_title' => '<h3>',
               'after_title' => '</h3>',
           ));
           register_sidebar(array(
           	'name' => 'Sidebar Right',
               'before_widget' => '',
               'after_widget' => '',
               'before_title' => '<h3>',
               'after_title' => '</h3>',
           ));
       ?>
       ```
   

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/dynamic-sidebar-customization/#post-1251990)
 * The reason pages and archives won’t go away is they are outside the part of the
   code that the widgets override if any are active. You have two choices. Either
   delete those sections altogether
 *     ```
       <div class="sidebar">
            <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?>
            <?php endif; ?>
       </div>
       ```
   
 * or put them inside the if statement
 *     ```
       <!-- Sidebar -->
       <div class="sidebar">
           <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?>
       	<h3>Pages</h3>
       	<ul>
          	  <?php wp_list_pages('title_li='); ?>
       	</ul>
   
       	<h3>Archives</h3>
       	<ul>
       		<?php wp_get_archives('type=monthly'); ?>
       	</ul>
         <?php endif; ?>
       </div>
       <!-- Sidebar -->
       ```
   
 *  Thread Starter [feeprinzessin](https://wordpress.org/support/users/feeprinzessin/)
 * (@feeprinzessin)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/dynamic-sidebar-customization/#post-1252042)
 * It’s not the pages and the archives I want gone, it’s the categories and the 
   blogroll in the_ right _sidebar. Will this code do that?
 * Thanks for your input~
 * …I think the biggest problem is that I can’t find any values for the right sidebar
   in any of the code. (Sorry if my terminology is wrong.)
 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/dynamic-sidebar-customization/#post-1252079)
 * See if you have a second sidebar template file in your theme folder.
 *  Thread Starter [feeprinzessin](https://wordpress.org/support/users/feeprinzessin/)
 * (@feeprinzessin)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/dynamic-sidebar-customization/#post-1252093)
 * No, there isn’t, I even re-downloaded the theme,[here](http://www.widgetreadythemes.com/?p=140)
   to check… If it helps, this is the page.php
 *     ```
       <?php get_header(); ?>
       <?php get_sidebar(); ?>
   
       		<!-- Content -->
       		<div id="content">
   
       			<?php if (have_posts()) : ?>
       			<?php while (have_posts()) : the_post(); ?>
       			<!-- Post -->
       			<div class="post" id="post-<?php the_ID(); ?>">
       				<div class="post-title">
       					<div class="post-date">
       						<span><?php the_time('d') ?></span>
       						<?php the_time('M') ?>
       					</div>
       					<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
       af: <?php the_author() ?> | <?php the_category(', ') ?>
       				</div>
       				<div class="post-entry">
       					<?php the_content('Read <span>more...</span>'); ?>
       					<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
       					<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
       				</div>
       			</div>
       			<!-- /Post -->
       			<?php endwhile; ?>
       			<?php else : ?>
       			<!-- Post -->
       			<div class="post">
       				<div class="post-title">
       					<h2>Not Found</h2>
       				</div>
       				<div class="post-entry">
       					<p>Sorry, but you are looking for something that isn't here.</p>
       				</div>
       			</div>
       			<!-- /Post -->
       			<?php endif; ?>
   
       			<div class="clear"></div>
   
       		</div>
       		<!-- /Content -->
       		<?php if ( !function_exists('dynamic_sidebar')
       || !dynamic_sidebar('sidebar2') ) : ?>
       <?php endif; ?>
       <?php get_footer(); ?>
       ```
   
 * Thank you.
 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/dynamic-sidebar-customization/#post-1252094)
 * These lines of code at the end
 *     ```
       <?php if ( !function_exists('dynamic_sidebar')
       || !dynamic_sidebar('sidebar2') ) : ?>
       <?php endif; ?>
       ```
   
 * load a second sidebar. Its contents would be from widgets.
 * If you can’t find the widgets for the 2nd sidebar, temporarily remove those lines
   of code and see if the categories and blogroll disappear.
 *  Thread Starter [feeprinzessin](https://wordpress.org/support/users/feeprinzessin/)
 * (@feeprinzessin)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/dynamic-sidebar-customization/#post-1252096)
 * No, they still show up. I have no idea what it could be…
 * I even took
 *     ```
       register_sidebar(array(
           	'name' => 'Sidebar Right',
               'before_widget' => '',
               'after_widget' => '',
               'before_title' => '<h3>',
               'after_title' => '</h3>',
           ));
       ```
   
 * out of the functions.php, but the sidebar still shows up. I have no idea what
   could be telling it to display.
 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/dynamic-sidebar-customization/#post-1252099)
 * well they are not coming from your sidebar code, so look elsewhere
 *  Thread Starter [feeprinzessin](https://wordpress.org/support/users/feeprinzessin/)
 * (@feeprinzessin)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/dynamic-sidebar-customization/#post-1252198)
 * I’ve looked through every file, still nothing. Thank you for trying though, I
   will keep at it.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Dynamic Sidebar Customization’ is closed to new replies.

## Tags

 * [sidebar](https://wordpress.org/support/topic-tag/sidebar/)
 * [widgets](https://wordpress.org/support/topic-tag/widgets/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [feeprinzessin](https://wordpress.org/support/users/feeprinzessin/)
 * Last activity: [16 years, 6 months ago](https://wordpress.org/support/topic/dynamic-sidebar-customization/#post-1252198)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
