-
AuthorPosts
-
March 5, 2022 at 6:57 pm #1343278
Hi Guys,
sorry to ask another custom post types question. I’d appreciate any help.
What i have:
– I created a view custom post types using the ‘CPT UI’-Plugin
– I added the fields i need with ‘ACF’-Plugin
– I created a *single* entry of a Custom Post Type – in the content area of that entry, i added the “include page” field of the layout architect, the page that is included has the acf-fields on it.Now, when i view that entry, it is displayed the way i like. So far, so good. The disadvantage is that if i want another entry to look like this, i’d have to copy the existing entry or again add the template to the content area.
What i want is:
– hide content area
– every newly created (not copied) custom post type entry will be using the template i created so every one looks the same.Any ideas? Thanks in advance!
– o.
March 6, 2022 at 4:14 am #1343325Hey onlylettersandnumbers,
Sorry, I don’t have any experience with the ACF Plugin or the CPT UI Plugin, and have seen very few questions asked about these, I believe you will need to copy this template to each page, but perhaps these plugin support teams would know how to achieve this within the plugin a different way?Best regards,
MikeMarch 6, 2022 at 6:35 pm #1343350Hey Mike,
okay, lets break it down to the bottom, maybe that brings up some ideas: Is there any way i can create a template with the layout architect that i can hook to a custom post type? Like storing the short code (from the debug view) somewhere and calling it in a template or so?!
Thanks again!
– o.
March 6, 2022 at 8:05 pm #1343373do you have allready a custum post type registered in your theme ?
Or is it a CPT by a plugin?You can include those CPTs to be supported by ALB _ see: Docu
f.e. if your CPT name is event:function avf_alb_supported_post_types_mod( array $supported_post_types ) { $supported_post_types[] = 'event'; return $supported_post_types; } add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1); function avf_metabox_layout_post_types_mod( array $supported_post_types ) { $supported_post_types[] = 'event'; return $supported_post_types; } add_filter('avf_metabox_layout_post_types', 'avf_metabox_layout_post_types_mod', 10, 1);
March 7, 2022 at 6:43 pm #1343530Hi Guenni007,
thanks for your reply. The custom post type support in enfold is already active and works as it should. So far no problem.
What i have in detail is here: https://imgur.com/a/IGyAdKi
– First, i have created cpt via cpt ui. So far, so good. (see cpt registration)
– After that, i added fields to the cpt via acf. (see cpt advanced custom fields)
– Image three shows a record, now created in the custom post type having additional fields appended with acf. In here you see i’ve included a page-content-element as a template.
– The actual template you see in picture four.That is working as supposed to. – Now, if i only *CREATE* a record, i do not have the template included you see in image number three. To have the same look and feel for all records, i have to *copy* a record that already includes the template and change the values.
I’d appreciate a cleaner solution, where the “single post” is automatically using a specific advanced layout template by the type of the post.
Cool? Any ideas? Better ideas?
Thanks & Cheers
– o.March 8, 2022 at 3:59 pm #1343659i do not understand the 3rd image.
if you like to add a new portfolio ( yes – even this is a custom post type ) you go and create a new portfolio.
Why don’t you create new post with new “hunde” ?
in this list there must be the new cpt’s – aren’t there?
or is image3 made this way? ( you erased the whole permalink )
why don’t you layout it you want on ( image3 ) and save the whole page as template.
you then can create a new “hunde” page – click on template and then on “hunde-Template” to insert the whole layout.Big Advantage is that you can save these templates via Enfold (Child) – Import/Export : “Export Layout Builder Templates”
March 8, 2022 at 7:05 pm #1343713Thanks Guenni,
i know about the templates you can save and reuse. The concept about the imported template is to split data from layout, so that if anything changes to the layout that “Hund” is displayed with, i only change one single template and this automatically applies to all records. With the saved templates that are copied to the record i would have to change every single record, if something on the layout changes.
I can see, that this is a very special case. But having a built-in concept for thoses type of things would be great, i think oxygen has some features supporting that kind of things – unfortunately i like enfold better. :)
Cheers anyway!
– o. -
AuthorPosts
- You must be logged in to reply to this topic.