• Hi all,

    I’ve really screwed things up this time I think …

    I’ve been trying to add a second sidebar to this theme, so that I’m able to use my custom templates with it.

    I started off with editing the functions, creating the second sidebar file (sidebarcustom.php) and then applied the template to the front page. All seemed to be going well until I viewed the other pages … which all ended up with errors regarding the sidebar!

    Please see what i mean here: http://www.campnageela.org/ ALL files now have an error.

    I decided to AGAIN try by starting over and edited my functions.php with the following:

    <?php
            register_sidebar(array('name'=>'sidebar'));
            register_sidebar(array('name'=>'sidebar2'));
        ?>

    I’ve now sidebar.php and sidebar2.php

    I’ve made sure the custom template and index.php files were calling the correct sidebar files … but still getting the errors on all pages!

    Please, help help or direction would be muchly appreciated ~

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • hmm…dunno if it helps, but in my old theme I made with 2 sidebars…this was the relevant part of my functions.php

    if ( function_exists('register_sidebars') )
    	register_sidebars(2);

    sidebar.php looked like

    <ul id="sidebarright">
    
    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(2) ) : else : ?>
    
     <li id="pages"><?php _e('<h2>Pages</h2>'); ?>
    <ul>
    <?php wp_list_pages('sort_column=menu_order&title_li='); ?>
    </ul>
     </li>
    
     <li id="categories"><?php _e('<h2>Categories</h2>'); ?>
    	<ul>
    	<?php wp_list_cats(''); ?>
    	</ul>
     </li>
    
    <?php endif; ?></ul>

    sidebar2.php looked like

    <ul id="sidebarleft">
    
    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>
    <?php get_links_list(); ?>
     <li id="archives"><?php _e('<h2>Archives</h2>'); ?>
     	<ul>
    	 <?php wp_get_archives('type=monthly'); ?>
    </ul>
     </li>
    
     <li id="Recent Posts"><?php _e('<h2>Recent Posts</h2>'); ?>
    <ul class="menublock">
    <p><?php wp_get_archives('type=postbypost&limit=05'); ?></p>
    </ul>
     </li>
    
     <?php endif; ?>
    		</ul>

    and I called em in my index.php like this

    <div id="sidebarwrapper">
    	    <div id="leftnav">
    
    	  <?php get_sidebar(); ?>
        </div>
        <div id="rightnav">
    	  <?php include (TEMPLATEPATH . '/sidebar2.php'); ?>
    </div>
    </div>

    Dunno if any of that helps you….and its been so long since I coded this….I forget my thought process

    Thread Starter jennifer420

    (@jennifer420)

    Thank you … all is fixed now! 🙂

    sweet!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Please help! Errors after adding a second sidebar ~’ is closed to new replies.