Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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 the parse_request action. From the parse_request action, the actual CPT post is fetched and parsed through setup_postdata() before the Enfold template template-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?

    #548177

    Hey Webbmekanikern!

    I’m not sure. Why are they being fetched differently?

    Cheers!
    Elliott

    #554663

    Hey 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. :-)

    #554664

    Hi!

    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,
    Basilis

    #554682

    Absolutely – 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.

    #557009

    Hey!

    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,
    Andy

    #559186

    Hey 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,
    Ivar

    #559837

    Hey!

    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,
    Vinay

    #560374

    Hi Vinay,

    That’s very disappointing to hear. Thank you anyway.

    Regards,
    Ivar

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Issues with custom post type and template builder’ is closed to new replies.