wp-tej
Member
Posted 4 months ago #
Hi,
My problem is I want to add blog posts at the end of my single post page.
Click the link here to see visual, to illustrate what I want to achieve.
At the momment I have included the following code in the 'single.php' file.
[Code moderated as per the Forum Rules. Please use the pastebin]
Help!
Thanks
wp-tej
Member
Posted 4 months ago #
Thanks used query_posts and work a treat!
wp-tej
Member
Posted 4 months ago #
Sure enough, I come across another problem.
The blog posts included in the single post page, also includes a post to the current page.
I'm trying to stop this duplication using the following code below:
<div id="mcontent">
<?php query_posts();
if (have_posts()) : while (have_posts()) : the_post();
if( $post->ID == $do_not_duplicate ) continue;?>
<div class="item shadow"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_post_thumbnail('large'); ?></a>
<div class="postsnip"><?php echo the_excerpt(); ?></div></div>
<?php endwhile; endif;
// Reset Query
wp_reset_query();
?>
Can't seem to crack it.
Any pointers?
Thanks
Where are you getting the value for $do_not_duplicate from?