• Resolved clint6998

    (@clint6998)


    I am trying to make the sidebar look like the rest of my site by adding images around the title, content of the section, and add a footer to each sidebar item. I have edited sidebar.php to add my code but it is not showing up. Everything looks the same.

    Here is the previous code:

    <div id="primary" class="widget-area" role="complementary">
    			<ul class="xoxo">
    
    <?php
    	/* When we call the dynamic_sidebar() function, it'll spit out
    	 * the widgets for that widget area. If it instead returns false,
    	 * then the sidebar simply doesn't exist, so we'll hard-code in
    	 * some default sidebar stuff just in case.
    	 */
    	if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
    
    			<li id="search" class="widget-container widget_search">
    				<?php get_search_form(); ?>
    			</li>
    
    			<li id="archives" class="widget-container">
    				<h3 class="widget-title"><?php _e( 'Archives', 'twentyten' ); ?></h3>
    				<ul>
    					<?php wp_get_archives( 'type=monthly' ); ?>
    				</ul>
    			</li>
    
    			<li id="meta" class="widget-container">
    				<h3 class="widget-title"><?php _e( 'Meta', 'twentyten' ); ?></h3>
    				<ul>
    					<?php wp_register(); ?>
    					<li><?php wp_loginout(); ?></li>
    					<?php wp_meta(); ?>
    				</ul>
    			</li>
    
    		<?php endif; // end primary widget area ?>
    			</ul>
    		</div><!-- #primary .widget-area -->
    
    <?php
    	// A second sidebar for widgets, just because.
    	if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?>
    
    		<div id="secondary" class="widget-area" role="complementary">
    			<ul class="xoxo">
    				<?php dynamic_sidebar( 'secondary-widget-area' ); ?>
    			</ul>
    		</div><!-- #secondary .widget-area -->
    
    <?php endif; ?>

    Here is what I have changed:

    <div id="primary" class="widget-area" role="complementary">
    			<ul class="xoxo">
    
    <?php
    	/* When we call the dynamic_sidebar() function, it'll spit out
    	 * the widgets for that widget area. If it instead returns false,
    	 * then the sidebar simply doesn't exist, so we'll hard-code in
    	 * some default sidebar stuff just in case.
    	 */
    	if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
    
    			<li id="search" class="widget-container widget_search">
    				<?php get_search_form(); ?>
    			</li>
    
    			<li id="archives" class="widget-container">
          	<div class="leftBoxContainer">
              <table height="39px" cellpadding="0px" cellspacing="0px" border="0px">
              	<tr>
                	<td align="center" valign="top" width="224px">
              			<table height="39px" cellpadding="0px" cellspacing="0px" border="0px">
                			<tr>
                  			<td><img src="wp-content/themes/to/images/SideBar_MiddleTitle_Area_01.png" width="6px" height="39px" alt="" /></td>
                   		 	<td align="center" width="10px" style="background-image:url(wp-content/themes/to/images/SideBar_MiddleTitle_Area_02.png); background-repeat:repeat-x;"></td>
                   		  <td align="center" valign="middle" style="background-image:url(wp-content/themes/to/images/SideBar_MiddleTitle_Area_02.png); background-repeat:repeat-x;"><h3 class="widget-title"><?php _e( 'Archives', 'twentyten' ); ?></h3></td>
                   		  <td align="center" width="10px" style="background-image:url(wp-content/themes/to/images/SideBar_MiddleTitle_Area_02.png); background-repeat:repeat-x;"></td>
                   		  <td><img src="wp-content/themes/to/images/SideBar_MiddleTitle_Area_04.png" width="6px" height="39px" alt="" /></td>
                 		  </tr>
               		  </table>
                  </td>
                </tr>
              </table>
            </div>
    				<div id="leftBoxContent">
    					<ul>
    						<?php wp_get_archives( 'type=monthly' ); ?>
    					</ul>
    				</div>
    				<div id="leftBoxFooter"></div>      
    
    			</li>
    
    			<li id="meta" class="widget-container">
    
    				<div class="leftBoxContainer">
              <table height="39px" cellpadding="0px" cellspacing="0px" border="0px">
              	<tr>
                	<td align="center" valign="top" width="224px">
              			<table height="39px" cellpadding="0px" cellspacing="0px" border="0px">
                			<tr>
                  			<td><img src="wp-content/themes/to/images/SideBar_MiddleTitle_Area_01.png" width="6px" height="39px" alt="" /></td>
                   		 	<td align="center" width="10px" style="background-image:url(wp-content/themes/to/images/SideBar_MiddleTitle_Area_02.png); background-repeat:repeat-x;"></td>
                   		  <td align="center" valign="middle" style="background-image:url(wp-content/themes/to/images/SideBar_MiddleTitle_Area_02.png); background-repeat:repeat-x;"><h3 class="widget-title"><?php _e( 'Meta', 'twentyten' ); ?></h3></h3></td>
                   		  <td align="center" width="10px" style="background-image:url(wp-content/themes/to/images/SideBar_MiddleTitle_Area_02.png); background-repeat:repeat-x;"></td>
                   		  <td><img src="wp-content/themes/to/images/SideBar_MiddleTitle_Area_04.png" width="6px" height="39px" alt="" /></td>
                 		  </tr>
               		  </table>
                  </td>
                </tr>
              </table>
            </div>
    				<div id="leftBoxContent">
    				<ul>
    					<?php wp_register(); ?>
    					<li><?php wp_loginout(); ?></li>
    					<?php wp_meta(); ?>
    				</ul>
    				</div>
    				<div id="leftBoxFooter"></div>        
    
    			</li>
    
    		<?php endif; // end primary widget area ?>
    			</ul>
    		</div><!-- #primary .widget-area -->
    
    <?php
    	// A second sidebar for widgets, just because.
    	if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?>
    
    		<div id="secondary" class="widget-area" role="complementary">
    			<ul class="xoxo">
    				<?php dynamic_sidebar( 'secondary-widget-area' ); ?>
    			</ul>
    		</div><!-- #secondary .widget-area -->
    
    <?php endif; ?>

    Nothing is happening. From what I have read I am in the right place, and want to edit the original sidebar, not add my own. I have added all images and css for the layout.

    Any ideas?

    Thanks,

    Clint

Viewing 3 replies - 16 through 18 (of 18 total)
  • esmi

    (@esmi)

    No! Never, ever, edit WordPress core scripts. And do not encourage others to do so. Editing core scripts can bring down your entire site and/or open security holes for hackers to use.

    Thread Starter clint6998

    (@clint6998)

    Well if I would have had some assistance instead of criticism and telling me to just to read a 4600 word page, maybe it would have been done correctly…Don’t you think?

    And I didnt’t edit any “core code” I wrapped my HTML around the core code. Adding a couple of extra div’s will not help a hacker any more than the ones that are there now…

    esmi

    (@esmi)

    That 4600 word page contained information that you need to know. Ditto for all of the other Codex pages that relate to theme development. You’ve been repeatedly pointed in the right direction but you seem unwilling to actually do any of the work yourself. If you cannot manage the work yourself, perhaps you need to consider hiring someone to carry out the work for you.

    This is a support forum. We help people to help themselves. We do not do all of the work for you. If that is not suitable for your needs, there are plenty of other resources that you can use instead.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Change design layout of sidebar problems’ is closed to new replies.