WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] What file contains the HTML that is loaded last? (4 posts)

  1. MrGunn
    Member
    Posted 7 years ago #

    I'm trying the mon.itor.us visitor tracking script, and the instructions are to place the code immediately before the </body> tag. Looking under manage > files (/wp-admin/templates.php) I can't find the </body> tag in any of the files listed. I can find the <body> tag in header.php, but I don't necessarily want to be calling my visitor tracking script in the header.

    What file contains the HTML that is loaded last?

  2. Eric Amundson
    Volunteer Moderator
    Posted 7 years ago #

    MrGunn, I think this depends a bit on your theme. In the default theme, the end body tag is in footer.php.

    In general, if you look at your index.php file in any theme, you'll see the includes used to call other files/functions. You can basically just follow the includes files until you find what you're looking for.

    Or, if you have a search tool on your machine, you can look for a string in the theme files, such as </body>

  3. MrGunn
    Member
    Posted 7 years ago #

    Aha! I was looking for a template file to put the code in, and I should have been looking for a theme file. Going to presentation > Theme Editor instead of Manage >Files does show the footer.php that I was looking for.

    Thanks for your quick answer.

  4. Eric Amundson
    Volunteer Moderator
    Posted 7 years ago #

    Splendid. Cheers! :)

Topic Closed

This topic has been closed to new replies.

About this Topic