Tagged: $avia_config, Custom Post Type, Template Builder
-
AuthorPosts
-
December 4, 2015 at 6:38 pm #547195
Hey,
I’ve got a custom post type with the Enfold template builder, which works good. The thing is, though, that some wrappers for most of the rows seem to be missing, so the content isn’t displayed properly. The correct content is however there.
The CPT posts are fetched through a completely custom rewrite rule, created with
add_rewrite_rule()
and parsed with theparse_request
action. From theparse_request
action, the actual CPT post is fetched and parsed throughsetup_postdata()
before the Enfold templatetemplate-builder.php
is printed. See the simplified code below.add_action('parse_request', 'wm_parse_request'); function wm_parse_request($query) { if(!isset($query->query_vars['wm-route'])) return; global $post; $post = get_post($id_to_cpt_enfold_post); setup_postdata($post); get_template_part('template', 'builder'); exit; }
I’ve noticed that one of the problems is that the post’s layout settings are ignored, so I think I have to recalculate the
$avia_config
. I don’t think this is the only problem, though.So – is there any way I can reinitialize the page? Or have I missed something else?
December 7, 2015 at 6:03 pm #548177Hey Webbmekanikern!
I’m not sure. Why are they being fetched differently?
Cheers!
ElliottDecember 17, 2015 at 10:20 pm #554663Hey Elliott!
Thank you for your answer, and sorry about the delay.
The posts are being fetched differently as they’re used as templates, i.e. post 1 and 2 use template A while post 3 uses template B.
I’d really appreciate to get this one solved. :-)
December 17, 2015 at 10:23 pm #554664Hi!
Is it possible for us to look on a live version and for your username and password to give a further look?
Thanks a lot
Regards,
BasilisDecember 17, 2015 at 10:44 pm #554682Absolutely – see private content. Thanks for your efforts.
If you watch the source code for the example page, you’ll see that some row wrappers are missing. And if you e.g. edit the template and add a color section, the example page will collapse completely.
In case you’d see another method that actually would work for this case, I would certainly not mind to change. As long as the possibilities are the same.
December 23, 2015 at 3:59 pm #557009Hey!
You are using an old version of the theme, so please upgrade to Enfold 3.4.7 and let us know if you still need help afterwards. Also update to newest WordPress version.
Best regards,
AndyJanuary 4, 2016 at 2:31 pm #559186Hey Andy!
I updated both WordPress and Enfold, and the problem does still exist. I’ve also added a color section to the example page, so you could see even better what I mean.
This is starting to get pretty urgent as I’ve got a deadline this Friday, so I’d really appreciate if you could investigate this further.
Thank you so far!
Regards,
IvarJanuary 5, 2016 at 11:11 am #559837Hey!
We would really like to help you but making changes to the core files or integrating custom code and recalculate the $avia_config is out of support scope.
Best regards,
VinayJanuary 6, 2016 at 9:52 am #560374Hi Vinay,
That’s very disappointing to hear. Thank you anyway.
Regards,
Ivar- This reply was modified 9 years ago by Webbmekanikern.
-
AuthorPosts
- The topic ‘Issues with custom post type and template builder’ is closed to new replies.