Add custom template 'sub-page' to Custom Post type?

I have a custom post type called 'Inspections'Doing this, you can access an inspection record by going to exam

I have a custom post type called 'Inspections'

Doing this, you can access an inspection record by going to example/inspections/inspection-slug-here

However, I want to add some 'sub-pages' if you will:

/inspections/<inspection-slug-here>/sub-page1
/inspections/<inspection-slug-here>/sub-page2

In this case, I would really like sub-page1 and sub-page2 to be templates that I can author in elementor, or something similar.

In a perfect scenario, I would like to pass the details of the parent (inspection-slug-here) to be loaded in this sub section so I can use custom fields or something of the likes.

Is there anything out there that does this? I am using elementor and an elementor templates tool, but cannot find any ways to do what i want.

Thanks!

I have a custom post type called 'Inspections'

Doing this, you can access an inspection record by going to example/inspections/inspection-slug-here

However, I want to add some 'sub-pages' if you will:

/inspections/<inspection-slug-here>/sub-page1
/inspections/<inspection-slug-here>/sub-page2

In this case, I would really like sub-page1 and sub-page2 to be templates that I can author in elementor, or something similar.

In a perfect scenario, I would like to pass the details of the parent (inspection-slug-here) to be loaded in this sub section so I can use custom fields or something of the likes.

Is there anything out there that does this? I am using elementor and an elementor templates tool, but cannot find any ways to do what i want.

Thanks!

Share Improve this question asked May 14, 2020 at 6:21 Barry ChapmanBarry Chapman 816 bronze badges 0
Add a comment  | 

2 Answers 2

Reset to default 0

If you are interested in using Plugin, and to add PHP code directly into your Elementor, try the following plugin which will enable to add PHP code directly into your Elementor pages.

https://wordpress/plugins/php-everywhere/

You can create a custom Single template and when saving it, set the display conditions to the posts you want.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742397986a4436333.html

相关推荐

  • Add custom template &#39;sub-page&#39; to Custom Post type?

    I have a custom post type called 'Inspections'Doing this, you can access an inspection record by going to exam

    1天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信