How to exclude post type from search but retain taxonomy archive listing
If you have set a post type to be excluded from search, you may have noticed that this has an odd drawback of also excluding the post type from any term archives for custom taxonomies as well. This is a detail coming from how WordPress core handles the query for the term archive. If you’re…
Read MoreCustomizing permalinks
When it comes to permalink customization, outside of slugs for the content types themselves, we do not have any official or formal settings for customizing permalink structures. This is because with the plugin, we’ve aimed to focus on just what can be set and created via the register_post_type() and register_taxonomy() functions. Because of that, we…
Read MoreRecommended Plugins
We recommend these plugins to be used in conjunction with Custom Post Type UI to further enhance your website. Permalinks Customizing permalinks to formats you’re wanting. Meta Data Content Type Management Migrating post content between post types and administration General debugging Query monitor can be used to inspect queries being made, templates being used for…
Read MoreCustom Post Types and Divi
Customizing Search Module By default, the Divi Search Module only searches posts and pages, depending on the settings configured in the module itself. The code snippet below allows to retain those settings, but also add in the post types registered with Custom Post Type UI to be considered with the search as well. Blog Module…
Read MoreCustom Post Type UI and WP-CLI
If you weren’t aware, you can actually do a good amount of of administration and site management via your computer terminal console with a tool like WP-CLI. We are not going to go into all of the powerful things it can do out of box, as that’s a documentation site on its own. We are…
Read MoreCustom Post Type UI Hooks
Current as of version 1.12.0. Reach out if you’ve found one we’re missing. Custom Post Type UI has 107 action and filter hooks available for usage. Some may prove more useful than others. Some are used primarily for integration with Custom Post Type UI Extended. Would love to hear how you’re using any of them.…
Read MoreSave 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 MoreChanging 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 MoreCreating an all term taxonomy archive
WordPress does not provide the easiest way to achieve post archives that have any term from a taxonomy. There is no functional URL that provides all the posts for a given taxonomy. WordPress does provideterm archives, but that is just one term at a time. If we’re blogging about mustards of the world, I don’t…
Read MoreHow to get dashes in post type/taxonomy slugs for URL SEO purposes
As of Custom Post Type UI version 1.13.2, this tutorial no longer applies. That release finalized allowing dashes in your content type slugs. 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…
Read More