NEWOur agents now make the SEO fixes on your site and check what worked →

Publish Pages Into an Existing WordPress Custom Post Type Instead of Pages

Updated

Yes. On the Configure CMS step choose Custom and pick the type. If the type is not in the list, WordPress is hiding it from its API. Add one filter (below), refresh the list, and pick it.

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#

  1. Open yoursite.com/wp-json/wp/v2/types in your browser. This is the list of post types WordPress lets tools read and write.
  2. Search the page (Ctrl+F or Cmd+F) for your type's name, for example Landing Pages.
  3. 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 );
Replace landing_page with your type's slug. The slug is in the address bar when you open the type in WordPress admin, after post_type=.

Where to Put It

  • You or your developer made the plugin: add 'show_in_rest' => true to its register_post_type call 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.
  1. Reload yoursite.com/wp-json/wp/v2/types. The type is now listed, with its rest_base.
  2. 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#

  1. Open your page set and go to the Configure CMS step.
  2. Choose Custom, then pick the type under Select Custom Post Type.
  3. 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.
  4. Generate and publish. Each page lands in that post type, at the address WordPress gives the type.

What SEOmatic Fills#

WordPress offers a field only when the type supports it. SEOmatic shows what the site offers.
FieldWhen it is there
Title, slug, statusAlways.
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 imageWhen the type supports a featured image.
ParentWhen the type is hierarchical, like Pages.
TemplateThe page templates your theme registers for that type.
SEO title, description, canonical, noindexThrough Yoast, Rank Math, AIOSEO or SEOPress, same as for Pages.
ACF fieldsEvery field group located on the type with Show in REST API on. See templates and ACF fields.

If Something Goes Wrong#

What you seeCause and fix
WordPress post type 'x' not foundThe 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 emptyThe 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.

digi-business-uk

Each local area page used to take us half a day to create and optimize.


With SEOmatic, we can create hundreds of pages in the same time, which helps our clients make the best use of their budget.


It's transformed how we deliver scalable SEO solutions.

will-hawkins

Will Hawkins

Marketing Director, Digi-Business UK

Give Your Site an SEO Team

Agents read your Search Console data, do the work, and prove what actually moved. You decide what ships.

  • You decide what ships
  • Verified live
  • One-click rollback

14-Day Trial for $1, credited to your first payment.