Thursday, November 17, 2022
HomeWordPress Developmentwp question - Present variety of posts AND quantity on present web...

wp question – Present variety of posts AND quantity on present web page (can not make it work)


I’ve regarded over the next however nonetheless can not make this work;

That is what I presently have;

                <?php $args = array(
                'post_type' => 'submit'
                );
                $wp_query = new WP_Query($args);

                international $wp_query;
                $web page = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
                $ppp = get_query_var('posts_per_page');
                $finish = $ppp * $web page;
                $begin = $finish - $ppp + 1;
                $complete = $wp_query->found_posts;
                if ($finish > $complete)
                  $finish = $complete;
                echo "Exhibiting posts $begin by way of $finish of $complete complete."; ?>

Hyperlink to dev web site – https://litfieldhouse-co-uk.flexxstaging.com/the-centre/information/ – web page 1 seems as if it is working because it exhibits 1 to 9 of 13 (all right), however going by way of to web page 2 it appears to indicate the very same? It ought to present 10 to 13 of 13.

Cany anyone assist?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments