WordPress.org

Forums

Help! Implementing Asides kills my permalinks. (6 posts)

  1. LaBella
    Member
    Posted 9 years ago #

    Hi there. I am hoping someone can help me with this.
    I tried implementing asides in my sidebar using this tutorial here:
    http://codex.wordpress.org/Adding_Asides

    Which I was able to achieve.
    However, it's killing my permalinks. I'm following the intructions completely.

    What could be killing my permalinks exactly? I'm wondering if I'm just misplacing the last bit of code that is instructed on the last part.
    "After doing all of that, you will need to put this line:

    <?php rewind_posts(); ?>

    Either before the loop in your index.php file or before the loop in your sidebar.php file, depending on which one comes last. So, for example, if <?php get_sidebar(); ?> comes after the <?php endif; ?> line in index.php, then you will have to put it before the loop in sidebar.php. "

    Because that part reallyyyyyyyy confused me.
    I placed that on my main index file like this:

    <?php
    get_header();
    ?>
    <?php rewind_posts(); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php if ( !(in_category('2')) ) { ?>

    <div class="info">
    <p class="date"><?php the_time('D j M Y'); ?>
    <div class="postinfo"><h2>" rel="bookmark"><?php the_title(); ?></h2>
    <?php _e("Filed in"); ?> <?php the_category(',') ?> | <?php comments_popup_link(__('No Comments'), __('1 Comment'), __('% Comments')); ?></div></div>
    <div class="contentpost"><?php the_content('View al content of this post »'); ?>

    <?php comments_template(); // Get wp-comments.php template ?>
    </div>

    <!-- <?php trackback_rdf(); ?> -->

    <?php } ?>
    <?php endwhile; else: ?>
    <h2>Not Found</h2>
    <?php _e("Sorry, but you are looking for something that isn't here."); ?>
    <?php endif; ?>

    <div>
    <div class="alignleft"><?php posts_nav_link('','','« Previous Entries') ?></div>
    <div class="alignright"><?php posts_nav_link('','Next Entries »','') ?></div>
    </div>

    </div>

    <?php get_footer(); ?>

    I hope someone can help!
    I'm testing this out on my test blog by the way.
    http://test.la-bella.net/

    Thanks in Advance.

  2. Mark Jaquith
    WordPress Lead Dev
    Posted 9 years ago #

    I don't see where you're calling your sidebar.

    It works like this:

    LOOP #1
    rewind_posts();
    LOOP #2

    Think of the posts as a tape. After watching it, you have to rewind it before anyone else can watch it. So it doesn't matter whether your sidebar comes before your main content or after, rewind_posts(); needs to go between the two loops. Above, if looks like you have it before the fist loop, and I don't see a second loop.

  3. LaBella
    Member
    Posted 9 years ago #

    yeah.... I don't see the sidebar being called either. LOL
    That's how the theme author wrote the main index file.
    *sigh*
    And I have no clue as to where and how I should call it.

  4. Michael Bishop

    Posted 9 years ago #

    looking at your source code, the sidebar is being called directly after the header navigation. So it's either in header.php or at the beginning of your index.php

    Which, to me, doesn't make sense, but that's for another topic...

  5. LaBella
    Member
    Posted 9 years ago #

    Augh... you're right.
    It's being called for in the header.
    So... should I move it?
    Do you think it would screw up the whole layout if I did?
    yeah, it doensn't make sense.

  6. mush
    Member
    Posted 9 years ago #

    Does anybody know how to limit the number of asides that are displayed?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags