Hi all I have problame with pagination with link to page 2 I installed plugin Wp-pagnavi ,When I click link to page 2 its dont show the content page 2,it still stay at page 1, How can I fix this.
you can see it at
http://westecmedia.com/?page_id=758
and this is my code blog post page:
<?php
/*
* Template Name: Page - Events Page
*/
?>
<?php get_header(); ?>
<div id="content-events">
<div id="head-event"><h3>EVENTS</h3></div>
<div id="main-event">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; else: endif; ?>
<?php query_posts('category_name='.get_the_title().'&post_status=publish,future');?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div id="part-event">
<div id="entry-thumbnail">
<?php the_post_thumbnail(); ?>
</div>
<div id="event-dess">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<p>
<?php
$content = get_the_content();
$content = strip_tags($content);
echo substr($content, 0, 300);
?>
</p>
<div id="read-more"><a href="<?php the_permalink(); ?>">Read More</a></div>
</div>
</div>
<div id="line-bottom"></div>
<?php endwhile; else: endif; ?>
<?php wp_pagenavi(); ?>
</div>
</div>
<?php get_footer(); ?>
Help me please ?
You should put all this in a loop and set
wp_reset_query();
and also have to usepaged
option post per page inquery_post
.Try this