WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] sidebar 2 is only working on hompage and not the rest of site (4 posts)

  1. SCStrat
    Member
    Posted 4 years ago #

    My "Sidebar 1" is running just fine, the widgets I placed under "sidebar 1" show up on the homepage as well as other pages and posts and categories. But my "sidebar 2" is only working on my homepage. If I place the calender widget under sidebar 2, it only works on the homepage and not on single posts, other pages or categories.

    How Can I fix that?

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    could depend on how things are called in

    does your index.php call to both sidebars, but single.php is different?

    Compare the codes.....

    you may also have some sort of a conditional if/else determining sidebar display

  3. SCStrat
    Member
    Posted 4 years ago #

    This is what my index.php says:

    <?php get_header(); ?>

    <!-- start sidebar one -->
    <div id="sidebar1" class="sidebar">

      <?php /* Widgetized sidebar, if you have the plugin installed. */
      if ( function_exists('dynamic_sidebar') && dynamic_sidebar(2)) : else : ?>

    • <h2><?php _e('Recent Posts'); ?></h2>

        <?php get_archives('postbypost', '10', 'custom', '
      • ', '
      • '); ?>
    • <?php endif; ?>

    </div>
    <!-- end sidebar one -->

    <!-- start content -->
    <div id="content">
    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div class="post" id="post-<?php the_ID(); ?>">
    <h1 class="title">" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></h1><br clear="all" />
    <p class="meta"><small>Posted on <?php the_time('F jS, Y') ?> by by <?php the_author() ?> <?php edit_post_link('Edit', ' | ', ''); ?></small></p>
    <div class="entry">
    <?php the_content('Read the rest of this entry »'); ?>
    </div>
    <div class="info">
    <p class="links">» <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>
    <p class="tags"><?php the_tags('Tags: ', ', ', ' '); ?></p>
    </div>
    </div>
    <?php endwhile; ?>
    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
    </div>

    <?php else : ?>

    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.</p>
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>

    <?php endif; ?>
    </div>
    <!-- end content -->

    <?php get_sidebar(); ?>

    <!--
    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
    </div>
    -->

    <?php get_footer(); ?>

  4. SCStrat
    Member
    Posted 4 years ago #

    Okay I got it! Thank you for your help!

Topic Closed

This topic has been closed to new replies.

About this Topic