Skip Navigation

[Resolved] Custom Post Type as child of standard WordPress Page

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 4 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1825823

Hi!
I'm developing a site that has a WordPress standard page as parent and a CPT as child.
I've read the support question: https://toolset.com/forums/topic/custom-post-type-as-child-of-standard-wordpress-page/ but my problem is not solved.
I have:
-Domenec Fita (WP Page)
- La Colecció (CPT)

I would like the url was: mydomain.com/domenec-fita/la-coleccio/title-of-the-post

I have create a parent-child one-to-many relationship where the parent is the WP Pages and the child "La Coleccio".
Then I've selected the Domenec Fita WP Page as La Colecció parent page.
In the CPT La Coleccio, I've selected "Page Attributes" and "has_archive", but when I edit any post from "La Coleccio", it appears the post atribute to select parent page, but only I can't no select no parent page.

What I'm doing wrong?

Thanks in advance!

#1826809

Hello,

The thread you mentioned above was outdated.

And there isn't such kind of built-in feature to setup the custom post permalink as you requested:
mydomain.com/domenec-fita/la-coleccio/title-of-the-post

Toolset Types plugin is using WordPress function register_post_type() to create custom post types, see WP document:
https://developer.wordpress.org/reference/functions/register_post_type/#rewrite
It can only setup the post type rewrite rule with static value by default.