Asides Implementation Causing Single Entry Problems
-
I have implemented asides on my sidebar, and while the asides do display correctly on the sidebar, and the main page does display correct, the post page, does not.
Whenever anyone accesses a post page, the system shows the asides entries (five of ’em, at any rate), instead of the post it should be showing. It essentially acts as if I did a category view of the “asides” category.
In my sidebar.php (called before the index.php postloop), I have the following code:
<p class="sideBarTitle"><?php _e('Asides'); ?></p>
<ul><?php query_posts( 'cat=32&showposts=5' ); ?><?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php if (in_category(32)) { ?>
<li><?php echo $post->post_excerpt ?> <?php the_content(); ?>
<?php comments_popup_link(__('#'), __('(1)'), __('(%)')); ?> </li>
<?php } ?>
<?php endwhile; ?>
<?php else : ?>
<li><?php _e("Sorry, no asides."); ?></li>
<?php endif; ?>
</ul>I have the following code on my main page (index.php):
<?php rewind_posts(); ?>
<?php $postnum = 1; $postnum2 = 1; $showads = 1; $showads2 = 4; ?>
<?php query_posts("cat=-32&showposts=10"); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php if ( !(in_category('32')) ) { ?>
----post and formatting commands----
<?php } ?>
<?php endwhile; ?>
<?php else : ?>This shows the five latest asides in the sidebar, and the latest ten entries on the page.
On my post page (single.php), I have nothing. Please help!
(I’m temporarily commented out all aside-related code in my blog until I find the solution.)
The topic ‘Asides Implementation Causing Single Entry Problems’ is closed to new replies.