Return wp_pagenavi()?
-
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)
The topic ‘Return wp_pagenavi()?’ is closed to new replies.