Support » Plugins » [Plugin: WP-Paginate] query post showing next page of tagged posts

  • jim


    Hi there,

    I’m developing a site where the client wants everything tagged ‘story’ to be displayed on the homepage.

    I have created the php code for the loop – below, which also shows wp-pagination:

    <div id="container">
    		<div id="content">
    		<?php if (have_posts()) : ?>
         	<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("tag=story&showposts=5"); ?>
            <?php while (have_posts()) : the_post(); ?>
    		<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class(); ?>">
        	<h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    		<div class="thumb-contain"><a href="<?php the_permalink() ?>"><?php the_post_thumbnail();?></a></div>
    		<div class="entry-content"><?php thematic_content(); ?>
    		 <a href="<?php the_permalink(); ?>" class="more-link">Read more</a>
    			<div id="meta-contain">
    				<div class="post-comments"><a href="<?php comments_link(); ?>"><?php comments_number('<span>0 Comments</span>','<span>1 Comment</span>','<span>% Comments</span>'); ?></a> </div>
    			</div><!-- end meta contain -->
    		</div> <!-- end post -->
    <?php endwhile; endif; ?>
    <?php if(function_exists('wp_paginate')) { wp_paginate(); } ?>
    		</div><!-- #content -->
    	</div><!-- #container -->

    However, when clicking on the pagination the following url is created:

    >> needs to be

    This obviously leads to a 404. How can I add to the code to insert /tag/story before the /page so that it works..

    <?php if(function_exists('wp_paginate')) { wp_paginate(); } ?>

    Can extra code be added to this?

    Many thanks for your help


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP-Paginate] query post showing next page of tagged posts’ is closed to new replies.