- This topic has 1 reply, 1 voice, and was last updated 3 years, 7 months ago by .
- The forum ‘General Discussion’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
i have a local install with the whole custom* set.
I got a custom-loop for my custom-post-type with a custom-taxonomy and both got custom-post/tax-meta (Carbon Fields).
Backend works, archive-* and single-* templates work as expected.
I made a few posts and set:
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; $args = array( 'posts_per_page' => 1, 'paged' => $paged );
And finally the pagination showed up. Tried to go to the second page and got a 404.
Flushed my permalinks, deleted .htaccess, flushed again... no effect.
For testing purposes i deactivated "pretty" urls and could go to the second page when i enter the url manually:
But when i try to go to the next page the url is
I played a bit around with the
$args and found out that when i set
paged => get_query_var( 'paged' )
the pagination is gone.
get_query_var( 'page' ) and pagination is back but still adds
&paged=3 to my url.
i'm confused and hope someone can point me to the error.
Ok. I got it working for now.
i duplicated the archive-* and renamed it to page-* and added the Template Name.
After that the whole pagination works as expected.
It looks like it is a problem with the CPT archive.
Still confused but at least i can go on.
© 2023 WPEngine, Inc.