Publish Pages Into an Existing WordPress Custom Post Type Instead of Pages
Updated
Before you start
Pages already published to Pages stay there. The post type applies to the pages a page set creates from now on. For pages under a different type, make a new page set.
Check Whether the Type Is Visible#
- Open
yoursite.com/wp-json/wp/v2/typesin your browser. This is the list of post types WordPress lets tools read and write. - Search the page (Ctrl+F or Cmd+F) for your type's name, for example Landing Pages.
- Found it: skip to pick the type in SEOmatic. Not there: WordPress is hiding the type from its API. Continue with the next section.
Not sure which types your site hides? The free WordPress Post Type Check reads a site and lists what is visible, what is hidden, and the fix for each.
Make a Hidden Type Visible#
A post type is hidden when whoever registered it left show_in_rest off. That is the default in WordPress, so most plugin-made types start hidden. One filter turns it on without touching the plugin. Change only the slug on the second line.
add_filter( 'register_post_type_args', function ( $args, $post_type ) {
if ( $post_type === 'landing_page' ) {
$args['show_in_rest'] = true;
}
return $args;
}, 10, 2 );Where to Put It
- You or your developer made the plugin: add
'show_in_rest' => trueto itsregister_post_typecall instead. No filter needed. - The type comes from a plugin or theme you do not control: install the Code Snippets plugin from WordPress.org, choose Add New, paste the filter, set it to run everywhere, and save and activate.
- You keep a child theme: paste it at the end of the child theme's
functions.php.
- Reload
yoursite.com/wp-json/wp/v2/types. The type is now listed, with itsrest_base. - In SEOmatic, under Select Custom Post Type, open Don't see your post type? and click Refresh the list.
Still missing after the filter
The slug is wrong more often than anything else. Labels like Landing Pages are not the slug. Open the type in WordPress admin and copy what follows post_type= in the address bar.
Pick the Type in SEOmatic#
- Open your page set and go to the Configure CMS step.
- Choose Custom, then pick the type under Select Custom Post Type.
- Continue to the fields step. SEOmatic reads the type's fields from WordPress and shows one input per field. If a field you expect is missing, click Resync Fields.
- Generate and publish. Each page lands in that post type, at the address WordPress gives the type.
What SEOmatic Fills#
| Field | When it is there |
|---|---|
| Title, slug, status | Always. |
| Content (the page body) | When the type uses the WordPress editor. Types built only from custom fields or a page builder template have no body field, and the body comes from the fields below. |
| Featured image | When the type supports a featured image. |
| Parent | When the type is hierarchical, like Pages. |
| Template | The page templates your theme registers for that type. |
| SEO title, description, canonical, noindex | Through Yoast, Rank Math, AIOSEO or SEOPress, same as for Pages. |
| ACF fields | Every field group located on the type with Show in REST API on. See templates and ACF fields. |
If Something Goes Wrong#
| What you see | Cause and fix |
|---|---|
WordPress post type 'x' not found | The type is hidden from the API, or its slug differs from its rest_base. Do the check above and pick the type again from the list. |
Permission denied when publishing to WordPress post type 'x' | The WordPress user behind your connection cannot create that type. If the plugin gave the type its own capabilities, give that user's role those capabilities, or connect as an administrator. |
WordPress set the post status to "draft" instead of "publish" | Same cause: the user can create but not publish that type. Fix the role, then publish again. |
| The type is listed but the page body is empty | The type has no editor, so there is no Content field. Fill the type's custom fields, or ask whoever made the type to add 'editor' to its supports. |
- Does this work for types made by Elementor, JetEngine, Pods or Toolset?
- Yes, the same way. JetEngine, Pods and Toolset have a Show in REST API switch in the type's settings; turn it on there instead of adding the filter. Elementor's own Landing Pages type is hidden and needs the filter with the slug
e-landing-page. - Is turning on show_in_rest safe?
- It lets logged-in users with the right role read and write the type through the API, which is what the block editor uses too. Public reading follows the type's existing visibility; nothing becomes public that was not already.
- Can one page set publish to two types?
- No. One type per page set. Make a second page set for the second type.
Was This Article Helpful?
Still need help?Email contact@seomatic.ai with your site address and a screenshot. A person replies, usually within one business day.


