custom post types?
-
I’m not seeing SEO fields on my custom post types. I’m pretty sure they were there at one time but not now. What am I messing?
-
NM, found the answer in another topic https://wordpress.org/support/topic/custom-post-types-263/
Hi @hube2,
The linked post is very old, and it’s no longer relevant.
Here are the updated requirements:
Manually:- The post type must support
autodescription-meta. - The post type must have set labels.
Requirement 1 needs to be added through PHP.
Requirement 2 needs to be set on the creation of the post type.If you wish to add post type support, simply use this call:
add_post_type_support( 'my_post_type', 'autodescription-meta' );Automatically:
- The post type object must have rewrite access.
- The post type object must be public.
- The post type must have set labels.
- The post type object must have an admin title field.
- The post type object must have an admin editor field.
Requirement 1 means that it can create front-end pages.
Requirement 2 means that it’s built to be publicly accessible on the front-end (e.g. User Orders in WooCommerce aren’t public, whereas Products are).If you wish to exclude requirements 4 and 5, you should use this filter:
add_filter( 'the_seo_framework_custom_post_type_support', '__return_empty_array' );I hope this helps!
-
This reply was modified 9 years, 3 months ago by
Sybre Waaijer. Reason: Missing requirement
Here’s the problem with the automatic support. We use ACF and more often then not we do not include the standard editor on custom post types. It’s similar for the title, many time in order to require post titles and as well as require unique post titles, the standard title field is removed and replaced with an ACF field.
I think that this plugin in great and only lacking in 2 things. The first is an admin interface to determine what post types and taxonomies will have the meta boxes added. The second is a place to manage the seo settings for post type archive pages, which also includes the standard posts archive page when it’s not shown on the home page.
While I can do this all with filters and I can add what’s needed using PHP, well, We’d prefer not to need to do this on every site we build or add the custom fields on every site to allow editors to manages archive page seo values. Needing to do so takes control of these things out of the hands of our clients and makes them dependent on us should they need to be changed for some reason.
Hi John,
I assume you use CPT UI in combination with ACF?
Then, you can simply add Custom “Supports” to apply manual integration, like so:

TL;DR version: Most importantly https://wordpress.org/about/philosophy/. Also everything else according to WordPress.org’s Philosophy.
The ability to control selected Post Type support is currently done by a “best guess”. Advanced additions, like through Custom Post Types, are mostly in the hands of developers and on how they control such interface. I can’t automatically bring anything to play without automatically determining whether it’s “good enough”, thus such limitations have been set. Steer into one direction, and although that might help some, it could just as well cause chaos at the other end.
Also, more options contribute to confusion for most users, especially when it comes to custom post types. This is where issue 20 also plays a role in, it’s an advanced and optional addition… through an extension.Only once every half year I get a comment where users try to combine various plugins to achieve something that isn’t meant to be. Although the reasoning might be perfectly logical, this does steer me in a direction where I shouldn’t add custom support.
Note that those comments only come from other developers, those whom also tend to be more active in the forums.In conclusion, we tend to then fall back to using filters. Extensions will eventually help many in this regard. But we’re just getting started on those π
I understand that a more advanced ecosystem is wanted, but keep in mind that it’s very difficult to determine where to put the options if the registered archives do not have an admin interface, which is almost always the case.
For this, I’d like to welcome you to issue 20, which is still in discussion and testing:
https://github.com/sybrew/the-seo-framework/issues/20Please keep in mind that in general, resources for building a free plugin are extremely limited. This is mainly because the authors must rely on donations.
It would be awesome if more developers contribute to awesome projects to fill in the missing gaps more rapidly, like the ones you’ve pointed out.Sybre,
Thanks for taking the time to explain.
Actually, I do use CPT-UI, however, I move the post types to code. When I’m done I want the client to be able to edit only those things that will not cause chaos if they decide one day to go poking around where they shouldn’t be. Yes, I do believe that choices are better than options (the WP “philosophy”) but I also believe that the client should have the options where they need them. My goal when building an admin is to give them complete control over all content while at the same time preventing them from mucking things up.
I completely understand the resources for a free plugin being limited. I have several free plugins and while the scope of those plugins is small, and kept that way for this very reason, even they sometimes tax the limit of my time and ability to look after them.
I’ll probably end up adding something to what I call my company’s “standard features plugin.” Had I realized that this plugin did not provide this I would have done so already, but my coworkers did not bring this to my attention until now. Frankly, I don’t particularly care for most of the other SEO plugins that are available and let’s just say that I developed trust issues with the last one I depended on. I’d probably consider helping to build an extension to do this, but I build admin pages exclusively using ACF simply because it just takes less time. Trust me, I get the limited resources aspect.
I’ll be following the github repo more closely, and you may get some suggestions for additional filters once I start digging through your code.
Hi @hube2,
Thank you so much for your compassion.
All suggestions are highly welcomed, especially when they come from users with developer’s competence.
If you wish to build an extension, then keep in mind that extensions are currently built with an extremely high standard (mainly with regards to security and countering otherwise non-semantics), so my advice would be to either steal another extensions’ code base as a template, or alternatively simply open issues for me to resolve until a public how-to API has been provided π
Have a wonderful day John!
- The post type must support
The topic ‘custom post types?’ is closed to new replies.