Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #232330

    Hi enfold-team,
    Hi everyone,

    for child-theme development purposes I often use this code-snippet in my functions.php to detect which template file is actually used.

    add_action('wp_head', 'phx_show_template');
    function phx_show_template() {
        global $template;
        var_dump($template);
    }

    Unfortunately the template variable is either NULL or empty. I would appreciate any idea why that’s the case or any suggestion to display the used template file on a different way.

    Many thanks
    Rob

    • This topic was modified 10 years, 8 months ago by 5plus5.
    #232598

    Hi 5plus5!

    Thank you for using the theme. I hope you’re doing well today. I’ll ask Dude to explain it to you. AFAIK the theme is not using page templates to build a page. It relies on shortcodes. The page is generated using the “template-builder.php” file if you’re using the Advance Layout Builder.

    Cheers!
    Ismael

    #232627

    Hey!

    Yes exactly. Enfold doesn’t use page templates to build the layout but it just inserts shortcodes into the content which then embed the shortcode output (you can find the shortcode files in wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/). The template file ( wp-content/themes/enfold/template-builder.php ) is just a wrapper which queries the shortcode/template builder content and outputs it.

    Best regards,
    Peter

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.