Support » Plugin: WP-PageNavi » Return wp_pagenavi()?

  • Resolved clockwood

    (@clockwood)


    Is it possible to return the value of wp_pagenavi instead of echoing it? I’m trying to get pagination working in a shortcode that lists posts from a custom post type.

    The following code adds pagination to the page and it functions, but since shortcodes don’t support echoing code, it places the pager outside the html structure:
    wp_pagenavi( array( 'query' => $query ) );

    Is there another function to call, or some other workaround, for this purpose?

    Many thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.