Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?

I am building a theme in which I have a post type, which will have an archive in a grid layout. You’re probably thinking, “Just use the CPT archive!” Well, there are some cons to that method that I’d like to avoid, which I’ve detailed below. This archive page needs to be as easy-to-use for … Read more

List All Post Types in Admin view using /wp-admin/edit.php?post_type=

I have successfully created a custom post type. I’m trying to construct a URL which points to a combined listing of posts of all post types on the view all posts page in the admin view. I can construct a URL which points to posts of specific post types, eg http://<mysite>//wp-admin/edit.php?post_type=my_post_type. But I can’t find … Read more

Get All IDs Of A Post Type Using WP_Query

I am trying to get a list of a custom post type’s IDs using WP_Query, but it is returning undesired result, which is a memory leak and stuck browser. Here is the code I use: $the_query = new WP_Query(“post_type=post&posts_per_page=-1&field=ids”); if ($the_query->have_posts()) { while ($the_query->have_posts()){ echo get_the_ID(); } } It makes my browser infinitely trying to … Read more