This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Reply To: Post format kill meta info?

#1679
karlo
Participant

Hello again,

I tried to edit post because it is so boring but then I see an error

ERROR: Forum ID is missing.

May be you should have a “general” sub-forum for these things?

Now I have problem because getting off-topic, heh.

Possibly saved: Snippet inserting inline comments where get template part starts, nifty and somewhat relevant. If not just remove this post.

/* SHOW ALL TEMPLATES, ALSO GET_TEMPLATE - http://wordpress.stackexchange.com/a/30993/9470 */
add_action('all','template_snoop');
function template_snoop(){
    $args = func_get_args();
    if( !is_admin() and $args[0] ){
        if( $args[0] == 'template_include' ) {
            echo "\n";
        } elseif( strpos($args[0],'get_template_part_') === 0 ) {
            global $last_template_snoop;
            if( $last_template_snoop )
                echo "\n\n";
            $tpl = rtrim(join('-',  array_slice($args,1)),'-').'.php';
            echo "\n\n\n";
            $last_template_snoop = $tpl;
        }
    }
}