Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other which template file are you using?

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #40472
    almcrorie
    Participant

    an interesting bit of code from Terry Sutton of waterstreetgm.org, which you put in the functions.php file:

    http://waterstreetgm.org/2012/10/10/which-template-an-essential-theme-development-function/

    /**
    * Print out the current template file to the footer.
    * Remove before launch.
    *
    */

    function waterstreetgm_which_template() {
    if ( is_super_admin() ) {
    global $template;
    echo ‘Template file:‘;
    print_r( $template );
    }
    }
    add_action( ‘wp_footer’, ‘waterstreetgm_which_template’ );

    #112699
    chrisburton
    Participant

    Could have used this last night. Thanks for sharing.

    #112662
    chrisburton
    Participant

    @FragaGeddon Did you put it in your functions.php file?

    #112738
    almcrorie
    Participant

    I am using a local test system using XAMPP. I notice that it only works when I am in wp-admin mode, not in local mode on my local test system, I am sure it is because of the if in the code, must look up what that if does, that is “if (is_super_admin())”.

    Al

    Al

    #112739
    almcrorie
    Participant
    http://digwp.com/2011/12/displaying-theme-data-with-wordpress/

    here is another link to display current template info

    Al

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Other’ is closed to new topics and replies.