Skip Navigation

[Resolved] Page option and the hierarchical option of creating a post type

This thread is resolved. Here is a description of the problem and solution.

Problem:
Page option and the hierarchical option of creating a post type

Solution:
"Pages" setting belongs to "rewrite" section you can see with the following link:
=> https://codex.wordpress.org/Function_Reference/register_post_type

You can find the proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/page-option-and-the-hierarchical-option-of-creating-a-post-type/#post-1158616

Relevant Documentation:
https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/

This support ticket is created 6 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by mohanY 6 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#1158559

Hi, I'm new to Toolset, and I have questions relating creating a new post type.

1. I see that toolset provide an option of "Pages", with the default to true, when creating a CPT. My question is what is this for? I saw on the documentation that this option means: "is the custom post type a dynamic (post) or static (page) piece of content". What is the difference between the dynamic and static here? I'm using Elementor for page builder, does this option "pages" have something to do with Elementor's dynamic content feature?

2. Also in the CPT options, "hierarchical". Does this have something to do with Toolset's relationship feature? If I would like to create 2 post types "countries" and "cities", I would like the two to be hierarchical that "countries" being the parent post type of "cities". What should do, shall I:
a) set the two post types to be hierarchical when creating them?
b) forget about this hierarchical option along, and just create the two post types and set a relationship between the two through Toolset's Relationships feature?

Sorry that my question seems to be a bit elementary cause I'm a new user to toolset.

Thank you very much.

#1158616

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

1. I see that toolset provide an option of "Pages", with the default to true, when creating a CPT. My question is what is this for? I saw on the documentation that this option means: "is the custom post type a dynamic (post) or static (page) piece of content". What is the difference between the dynamic and static here? I'm using Elementor for page builder, does this option "pages" have something to do with Elementor's dynamic content feature?
===>
Well - that "Pages" setting is belongs to "rewrite" section you can see with the following link:
=> https://codex.wordpress.org/Function_Reference/register_post_type

'pages' => bool Should the permalink structure provide for pagination. Defaults to true

2. Also in the CPT options, "hierarchical". Does this have something to do with Toolset's relationship feature?
====>
The option "hierarchical" is described under "hierarchical" section with the following link:
=> https://codex.wordpress.org/Function_Reference/register_post_type

hierarchical
(boolean) (optional) Whether the post type is hierarchical (e.g. page). Allows Parent to be specified. The 'supports' parameter should contain 'page-attributes' to show the parent select box on the editor page.
Default: false

If I would like to create 2 post types "countries" and "cities", I would like the two to be hierarchical that "countries" being the parent post type of "cities". What should do, shall I:
a) set the two post types to be hierarchical when creating them?
==> NO
b) forget about this hierarchical option along, and just create the two post types and set a relationship between the two through Toolset's Relationships feature?
==> Yes, if you want to build post relationship between your post types, you should follow the post relationship docs and try to create one to many post relationship between your country (parent) and cities (child) psot types.

More info:
=> https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/

#1158648

My issue is resolved now. Thank you!