• Tested on several sites.

    Anyone have a fix for this. Pretty much useless without a list of template parts used.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter John Huebner

    (@hube2)

    This issue.

    The WP function wp_admin_bar_render() used to be called on the wp_footer hook.

    
    add_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); // Back-compat for themes not using wp_body_open.
    

    And it is now called on the wp_body_open hook

    
    add_action( 'wp_body_open', 'wp_admin_bar_render', 0 );
    

    This means that the admin bar is being rendered before this plugin can gather a list of template parts.

    Temporary fix can be made by removing the new action

    
    remove_action('wp_body_open', 'wp_admin_bar_render', 0);
    
    • This reply was modified 3 years, 6 months ago by John Huebner.
    Thread Starter John Huebner

    (@hube2)

    A more permanent solution that you can leave in place, or at least I can because this plugin is only active when I need to work on a site.

    
    if (class_exists('WhatTheFile')) {
    	remove_action('wp_body_open', 'wp_admin_bar_render', 0);
    }
    
    Plugin Author Barry Kooij

    (@barrykooij)

    Thanks for reporting! I’ll work on a fix soon!

    janine

    (@janinewebbureau)

    I noticed on one site where the template parts are directly in the folder template parts, without subfolders, its still working, other sites that have subfolders for the different template parts, don’t show the template parts in what the file, hope this is helpfull

    Thread Starter John Huebner

    (@hube2)

    @janinewebbureau more than likely it’s a theme that does not support wp_body_open

    janine

    (@janinewebbureau)

    @hube2 the sites are both based on underscores, but maybe i made a mistake somewhere

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘No Longer Showing Template Parts’ is closed to new replies.