WP Page Navi on Search.php Page (1 post)

  1. cssbros
    Posted 3 years ago #

    Hello Guys!

    I've been troubleshooting for days now and I can't seem find the problem on getting the WP PageNavi work on my search.php results page.

    Here's the code for my search.php

    <?php if ( have_posts() ) : ?>
    <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;

    <?php while ( have_posts() ) : the_post() ?>
    <div class="post">
    <div class="image-container">"> <img src="<?php the_field('thumbnail_image'); ?>" alt=""> </div>
    <!--image container-->
    <div class="article">
    <?php the_title(); ?>
    <?php the_field('excerpt'); ?>
    " class="readmore">Read More > </div>
    <div class="article-2"> <span class="price">
    <?php the_field('price'); ?>
    <div class="stars"> <img src="<?php the_field('rating_image'); ?>" alt=""> </div>
    <div class="company"> "><img src="<?php the_field('company_icon'); ?>" alt=""> </div>

    <!--article 2-->
    <div class="clear"></div>

    <?php endwhile; ?>
    <?php wp_pagenavi(); ?>

    [please remember to mark any posted code properly - http://codex.wordpress.org/Forum_Welcome#Posting_Code ]

    I tried every solution but I really can't the page 2,page 3 and so on, to show up.

    It keeps showing 404 error page.


Topic Closed

This topic has been closed to new replies.

About this Topic