mardi 8 décembre 2015

How To make pagegination work correctly in wordpress?

Hi all I am a new of wordpress ,I have problame with pagination when I clik to next post its show not found,I am install plugin wp pagenavi, and I put code in my blog post ,it is show pagination but I have problame with link to next post ,example when I click to next post http://ift.tt/1PVb6m7 it show:

Something went Wrong!
404
--> 

You can see http://ift.tt/1TyK2GW

and this is my code in event-page.php:

<?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(); ?>

who can help me pleast ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire