- This topic has 13 replies, 4 voices, and was last updated 1 year, 1 month ago by David.
August 15, 2019 at 10:51 am #985057Brad
Is it possible to duplicate the the template that uses sections and rename it so as to create pages similar to CPT?
Add new page
Pages Baseball Teams
Add new Baseball Team Page
In wp-admin when selecting “add new Baseball Team Page” the options of a page, sections, etc would be available as if you selected “Add new page”
There’s no drop down template selection box on in the Pages Attribute meta box in wp-admin in this theme so I’m not sure how to utilize custom templates.
Thanks for your help.
Reference research link:August 15, 2019 at 3:49 pm #985238Brad
I’m doing this course. It talks about creating custom templates for CPT and throwing them in a plugin.
My question goes back to can i somehow retain the look and functionality of GP (add page header, use sections) by duplicating the corresponding GP php template that pulls in the sections features for pages?
Thanks for your help in pointing me in the right GP file direction if this is possible.August 15, 2019 at 5:38 pm #985282TomLead DeveloperLead Developer
Just to confirm, are you wanting to create a page in Sections, and then use that page as a template to create other pages?
If so, it’s not easily do-able with Sections itself. If you create the post in the CPT, you can then duplicate it using a plugin like this: https://en-ca.wordpress.org/plugins/duplicate-post/
It’s not ideal, but it means you don’t need to start from scratch each time.
Let me know 🙂August 15, 2019 at 6:33 pm #985309Brad
Yes and no. Basically I’d like to have the options available from GP premium (sections, etc) be available in a CPT template possibly by me duplicating the template file that GP pages uses? I realize it’s going to be a challenge.
CPT name = ambassadors
Add new ambassador
I copy over GP page.php from parent theme into the child theme.
I rename it single-(my custom post type name).php
Get template parts:
I create a folder structure in the child theme to match the GP parent theme adding get template part php pages as needed. Add ‘ambassadors’ to correspond php pages that i want to customize (such as removing author, date below title).
I realize this is a support ticket area, not a customization forum. If I’m headed in the right direction though please let me know. Possibly the way to go is via GB function hooks and use conditionals. If this totally wouldn’t work please let me know.
All that said, if this is beyond the scope of what you can offer here or too complex to explain I respectfully understand. I’m just trying to push the envelope of what I can accomplish with GP and create a product for launch for which I’ve invested two years of my life into.
Sincere thanks for the plugin link. Interesting plugin. Will download and try it out either way.
BradAugust 16, 2019 at 6:02 am #985608Brad
I just found this post type switcher plugin.
Possibly if I first create my CPT.
Add new myCPT
Next I converting myCPT draft to a GP page via the plugin below. I continue designing the post, now a page, using sections. When saving to publish, I duplicate it (to be safe as a testing backup). I open it and convert it back to the original CPT.
Do you think this would work?August 16, 2019 at 6:10 am #985620DavidStaffCustomer Support
just to be clear – you’re want to be able to use Sections in a CPT?
If so this filter does the job:August 16, 2019 at 6:17 am #985627Brad
Yes. Very cool! Sincere thanks. Will try it out when on desktop.August 16, 2019 at 6:19 am #985630DavidStaffCustomer SupportAugust 16, 2019 at 6:47 am #985652Brad
It worked! Thank you! You saved me A Lot of trial and error dev timeAugust 16, 2019 at 6:48 am #985654DavidStaffCustomer SupportAugust 16, 2019 at 7:04 am #985669Klaus
Hello, does this filter give me the possibility to use “sections” with woocommerce products? (Where using sections is not enabled). Regards KlausAugust 16, 2019 at 7:08 am #985673DavidStaffCustomer SupportAugust 16, 2019 at 7:11 am #985677Klaus
Thanks.August 16, 2019 at 7:20 am #985683
- You must be logged in to reply to this topic.