Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter easysun3000

    (@easysun3000)

    Hello, in the administration panel>appearance>editor, in the list of templates i have two sidebar templates:
    sidebar (sidebar.php)
    sidebar2.php (sidebar2.php)

    This is the code at the index.php (conditional sidebar is somewhere in the middle. Thank you !!!

    <?php get_header(); ?>
    <div id=”content”>

    <div id=”articles”>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class=”article” id=”post-<?php the_ID(); ?>”>
    <div class=”articleMeta”>
    <div class=”dayMonth”><?php the_time(‘j M y’) ?></div>
    <div class=”comments”><?php comments_popup_link(‘Be first!’, ‘1 Com.’, ‘% Com.’); ?></div>
    </div><!– end articleMeta –>
    if (is_page(3)) {
    get_sidebar(‘sidebar2’);
    }
    <div class=”articleBody”>
    <h2>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h2>
    <?php the_content(‘ ‘); ?>
    <div class=”readMore”>#more” rel=”bookmark” title=”Read the entire article!”>Read the entire article!</div><div class=”comenteaza”><?php comments_popup_link(‘Post your comment’, ‘One comment’, ‘% comments’); ?></div>
    </div><!– end articleBody –>

    <div class=”clear”></div>
    </div><!–end article –>
    <?php wp_link_pages(); ?>
    <?php endwhile; ?>
    <div class=”navigation”>
    <div class=”alignleft”><?php next_posts_link(‘« Older articles’) ?></div>
    <div class=”alignright”><?php previous_posts_link(‘Newar articles »’) ?></div>
    <div class=”clear”></div>
    </div>
    <?php else : ?>
    <div class=”article”>
    <div class=”articleMeta”>
    <div class=”dayMonth”> </div>
    <div class=”category”> </div>
    <div class=”comments”> </div>
    </div><!– end articleMeta –>
    <div class=”articleBody”>
    <h2>Not Found</h2>
    <p>Sorry, but you are looking for something that isn’t here.</p>
    </div><!– end articleBody –>
    <div class=”clear”></div>
    </div><!–end article –>
    <?php endif; ?>

    </div>

    </div><!– end content –>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    Thread Starter easysun3000

    (@easysun3000)

    Still, unfortunatelly does not work. Is there maybe a specific place where i have to insert this piece of code in index.php?
    Thanks.

    Thread Starter easysun3000

    (@easysun3000)

    Hello Frumph, and thank you very much.

    I have done exactly what you suggested. Where name of the page is Page ID (actually a number).

    But unfortunatelly does not work. Is there maybe a specific place where i have to insert this piece of code in index.php?

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