• Resolved raduletzgo

    (@raduletzgo)


    I am currently using the zen minimalist theme for my blog. This blog is using a sidebar like most blog pages do.
    I tried to add a second sidebar which worked, well almost. The second sidebar appears on my blog but problems are shifting. 😉

    As soon as I add this
    <?php include("sidebar2.php"); ?> to my index.php file all my links on the blog stop working. Everytime I click on one I get to the main page. Now I am trying to understand how this theme loads the original sidebar. Maybe this will help me somehow. I see no function like this <?php get_sidebar(); ?> in the index.php file.

    Does anyone know what’s going on here?

    <?php
    get_header();
    ?>
    
    <?php include("sidebar2.php"); ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <?php the_date('','<h2>','</h2>'); ?>
    
    <div class="post">
    	 <h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    	<div class="meta"><?php _e("Filed under:"); ?> <?php the_category(',') ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(__('Edit This')); ?>
    	</div><!-- end META -->
    
    	<div class="storycontent">
    		<?php the_content(__('(more...)')); ?>
    	</div><!-- end STORYCONTENT -->
    
    	<div class="feedback">
                <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    	</div><!-- end FEEDBACK -->
    
    	<!--
    	<?php trackback_rdf(); ?>
    	-->
    
    </div><!-- end POST -->
    
    <div id="comments-post">
    <?php comments_template(); // Get wp-comments.php template ?>
    </div><!-- end COMMENTS-POST -->
    
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    
    <?php posts_nav_link(' — ', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?>
    
    <?php get_footer(); ?>

    Since the original sidebar is not called in the index file there is no need to do it.
    I tried it anyway by adding both sidebars to the index file

    <?php include("sidebar.php"); ?>
    
    <?php include("sidebar2.php"); ?>

    I changed the functions.php as well in this case (2 sidebars instead of 1), but still no luck. Links are still broken/bad.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘all links broken when second sidebar is added to zen minimalist theme’ is closed to new replies.