Using the Debug Info tab for Custom Post Type UI

If you have used our support forums at any time in the past number of years, chances are you’ve received a response from Michael, helping debug whatever issue you were experiencing at the time. Hopefully Michael has proved helpful and resolved a given issue swiftly and timely. However, there are cases where Michael just needed…

Read More

Save CPTUI settings data to file

If you ever find need to save your Custom Post Type UI settings data to a file, on top of to the database like normal, the following snippet should help you out. This will be particularly useful if you find need to version control the settings, as databases aren’t easy to version control themselves. What…

Read More

Changing posts per page for a post type

By default, post type archives inherit the same posts per page amount as the Reading settings page and the “Blog pages show at most” setting. However, depending on your use case, you may need to change that value just for a given post type. Utilizing the pre_get_posts action hook, you can easily modify the posts…

Read More

Creating an all term taxonomy archive

The following was originally publisehd at How to Create a Taxonomy Archive: Excuse Me, Can You Show Me All Your Grey Poupons? and has been modified to be a more straightforward documentation reference. Created an archive for all terms from a taxonomy. WordPress does not provide the easiest way to achieve post archives that have…

Read More

How to get dashes in post type/taxonomy slugs for URL SEO purposes

Custom Post Type UI version 1.3.0 introduced JavaScript that enforces underscore characters in slugs. When a user tried to type a dash in the slug field, it gets automatically switched to an underscore. We have always tried to use smart defaults in CPTUI for our users. The slug field is another place where we continue that. In WordPress core,…

Read More

How to add your custom post type to RSS feeds

Out of the box, WordPress does not include custom post types in RSS feeds. Because of this, you need to add the post types to the query yourself. You will add the following snippets to your theme’s functions.php file or if you want, to a custom plugin build just for your own website. Adding all…

Read More

Listing posts by post title in WP Admin

If you want to list your custom post type posts in alphabetical order when viewing the WordPress admin area, the following code will help. It should go in your active theme’s functions.php file or a custom plugin. function pluginize_order_cpt_by_title( $query ) { if ( ! is_admin() ) { return; } if ( ! $query->is_main_query() )…

Read More

Adding post type posts to WP Nav Menus

If you want to add custom post type posts, you first need to make sure each desired post type is getting the necessary parameter. Once it is, you should see a section for it on the left side of the menu builder screen. Adding the support. When editing your post type, locate the “Show in…

Read More

Adding WordPress REST API support

The pending WordPress REST API has been a hot topic for WordPress developers and agencies for awhile now. While it’s true the endpoints are not presently merged into WordPress core, the framework needed to create endpoints are, making them able to be manually added by developers, coupled with having the REST API plugin installed and…

Read More