Hopeless with Custom Post Types
-
The plugin works well in general, but that’s pointless in modern WordPress sites where we have our own CPT custom post types. All the stuff on the web about making sure we used
paged
properly, or don’t reset_posts, etc, none of those things work. My code:$args = array( 'post_type' => 'stories', 'orderby' => 'date', 'order' => 'DESC', 'posts_per_page' => (comes from WP options) ); $catPost = get_posts( $args ); foreach ($catPost as $post) { .....
It still doesn’t work. I’ve looked at the pinned message on this forum. I’m using paged properly. Is
get_posts()
a problem and I’m to use the WP_Query function?Appreciate any help please.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Hopeless with Custom Post Types’ is closed to new replies.