• Resolved drbigfresh

    (@drbigfresh)


    There is an error in your code. This function:
    function get_template_hierarchy($template, $class = null) {
    // whether or not .php was added
    $template = rtrim($template, ‘.php’);

    if ( $theme_file = locate_template( array($this->token . ‘/’ . $template . ‘.php’) ) ) {
    etc…

    locate_template() needs the .php extension or it doesn’t work. Or I screwed up, but that ended up making it work for me with a child theme…

    https://www.ads-software.com/extend/plugins/widget-builder/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Timothy Wood

    (@codearachnid)

    Great catch! I will take a look further and add in error proofing for this in the next bugfix.

    Plugin Author Timothy Wood

    (@codearachnid)

    So the more I’ve tested this I’m not sure I’m having the same issue you stated with the lookup – any chance you could give me details about how you’re using the template hierarchy method?

    Plugin Author Timothy Wood

    (@codearachnid)

    Looks to be working.

    Plugin Author Timothy Wood

    (@codearachnid)

    the template pathing folder has been updated in the lastest release v1.3 – let me know if you continue to have issues.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Widget Builder] Error in get_template_hierarchy…’ is closed to new replies.