WordPress.org

Ready to get started?Download WordPress

Forums

I want a sidebar on all pages (5 posts)

  1. sheriozampelli
    Member
    Posted 5 years ago #

    I'm just using the basic wordpress template. I have ads in my sidebar that I want to show on every page, even if I send people a permalink to only one certian blog, I want them to see all the same things you would see if you came to the first page.

    My blog is here: http://sherizampelli.com/blog/

  2. figaro
    Member
    Posted 5 years ago #

    You could go through the default post/page templates and include the sidebar. Also, this may help...I haven't looked at it in-depth, but it looks like what you want.

    http://www.drostdesigns.com/wordpress-default-template/

  3. jeromyboyd
    Member
    Posted 5 years ago #

    You will need to edit your single post template and add the sidebar to the source coding. Simply copy the important part of the single post template (ie. - the loop for single post) and then take your front page template and paste it into your single post template, changing to full loop to your single post. This will take the sidebar and add it to all single post pages.

    You can do the same for all pages, including search and archive, as you see fit.

  4. sheriozampelli
    Member
    Posted 5 years ago #

    jeromyboyd...I'm trying to follow you. I went to my single post template. I'm having a hard time knowing exactly what the "important part/loop for single post" is.

    Here is my code, can you tell me where the "loop" part starts and ends?

    <?php get_header(); ?>

    <div id="content" class="widecolumn">

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

    <div class="navigation">
    <div class="alignleft"><?php previous_post_link('« %link') ?></div>
    <div class="alignright"><?php next_post_link('%link »') ?></div>
    </div>

    <div class="post" id="post-<?php the_ID(); ?>">
    <h2><?php the_title(); ?></h2>

    <div class="entry">
    <?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?>

    <?php wp_link_pages(array('before' => '<p>Pages: ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    <?php the_tags( '<p>Tags: ', ', ', '</p>'); ?>

    <p class="postmetadata alt">
    <small>
    This entry was posted
    <?php /* This is commented, because it requires a little adjusting sometimes.
    You'll need to download this plugin, and follow the instructions:
    http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
    /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?>
    on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
    and is filed under <?php the_category(', ') ?>.
    You can follow any responses to this entry through the <?php post_comments_feed_link('RSS 2.0'); ?> feed.

    <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    // Both Comments and Pings are open ?>
    You can leave a response, or " rel="trackback">trackback from your own site.

    <?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    // Only Pings are Open ?>
    Responses are currently closed, but you can " rel="trackback">trackback from your own site.

    <?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
    // Comments are open, Pings are not ?>
    You can skip to the end and leave a response. Pinging is currently not allowed.

    <?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
    // Neither Comments, nor Pings are open ?>
    Both comments and pings are currently closed.

    <?php } edit_post_link('Edit this entry.','',''); ?>

    </small>
    </p>

    </div>
    </div>

    <?php comments_template(); ?>

    <?php endwhile; else: ?>

    <p>Sorry, no posts matched your criteria.</p>

    <?php endif; ?>

    </div>

    <?php get_footer(); ?>

  5. sheriozampelli
    Member
    Posted 5 years ago #

    Just for fun I put this code:
    <?php get_sidebar(); ?>

    Right before the get_footer code because that the way it is on the page template. It made the sidebar show up but it's underneath everything, not along the side of the post like I want it to be.

    Here's a sample:
    http://sherizampelli.com/blog/2008/12/yahoo-group-for-overcoming-self-sabotage/
    Am I on the right track?

Topic Closed

This topic has been closed to new replies.

About this Topic