WordPress.org

Forums

WP-PageNavi
[resolved] error when used wp-pagenavi (4 posts)

  1. nhukhucvn
    Member
    Posted 3 years ago #

    <?php
                        if(is_home()){
    
                            query_posts('cat=-8,-9'); <!--not show cat products and news-->
                        }
    
                      ?>
                        <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                        <div class="newpost_item">
                            <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
                            <p class="metadata_post"> Post By : <?php the_author(); ?></p>
                            <?php
                                if(has_post_thumbnail()){
                                the_post_thumbnail();
                                }
                            ?>                       
    
                            <p>
                                <?php the_content(''); ?>
                            </p>
                            <p class="read_more"><a href="<?php the_permalink(); ?>">Chi tiết</a></p>
                        </div><!--End DIV #newpost_item -->
                        <?php Endwhile; ?>
                        <?php else: ?>

    error : only page 1 , when i go to page 2, the address was moved page/2 but the content does not change.
    my site : http://nhikhucvn.com
    help me ! thanks

    http://wordpress.org/extend/plugins/wp-pagenavi/

  2. scribu
    Member
    Plugin Author

    Posted 3 years ago #

  3. nhukhucvn
    Member
    Posted 3 years ago #

    finished . thanks you very much

  4. nhukhucvn
    Member
    Posted 3 years ago #

    query_posts('cat=-8,-9');
    i replaced it with this:
    query_posts( array( 'category__and' => array(4,6), 'paged' => get_query_var('paged') ) );
    but cannot display entries within categories ID number 4,6.
    can you help me?thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic