T
T
towncitybr2021-08-26 21:26:52
WordPress
towncitybr, 2021-08-26 21:26:52

How to get the current page on vp?

I try like this, but some kind of nonsense ($ paged)

<?php

                       	$paged = get_permalink();
                      $args = [
              'total'        => $query->max_num_pages,
              'end_size'     => 2,
              'mid_size'     => 2,
              'prev_next'    => True,
              'prev_text'    => __(''),
              'next_text'    => __(''),
              'paged' => $paged
            ];
echo paginate_links( $args );

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2021-08-26
@towncitybr

try like this

$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question