1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Finding </body>

Discussion in 'HTML & JavaScript' started by JasonG, Apr 11, 2011.

  1. JasonG

    JasonG Regular Member

    Joined:
    May 28, 2009
    Messages:
    321
    Likes Received:
    92
    Occupation:
    Teacher, IM hobbyist
    Okay - back story: I have always used xsitepro to make my sites due to its wysiwyg editor, never touched WP, meaning I have never used an ftp client (filezilla).

    onto my situation: I have a script I want to put on my site, and the instructions say "paste (the script I have) right in front of the </body> tag in your code."


    Well - I have no idea how to find that - I am doing sort of a WP test blog to learn how to use it, have the thesis theme, and I have no idea how to get to the place where I can see this </body> tag


    I hope I am clear with all of this - anyone have any suggestions or know what I am talking about?

    Thanks will be given.

    Jason
     
  2. jetti789

    jetti789 Junior Member

    Joined:
    Feb 7, 2009
    Messages:
    124
    Likes Received:
    90
    Location:
    Home - Get OFF my Lawn..damn kids
    one thing that works.

    bring up the webpage you are working on.
    then right click on it
    this should bring up a link for page source

    then do ctrl F on your computer and it should help you find

    type in the phrase you are looking for
    (control F will search)
     
    • Thanks Thanks x 1
  3. theconfidenceman

    theconfidenceman Regular Member

    Joined:
    Feb 24, 2008
    Messages:
    262
    Likes Received:
    57
    Location:
    New York
    Home Page:
    i dont know thesis. but if you get the firebug firefox plugin. you will be able to see the code and determine which file it is in. then you can download that file or edit on the fly in ftp and that should be it.
     
    • Thanks Thanks x 1
  4. Jeevs

    Jeevs Supreme Member

    Joined:
    Dec 14, 2010
    Messages:
    1,359
    Likes Received:
    1,628
    ctr+F :rolleyes:
    type </body>

    and thats it....no need to press enter if you are using Chrome
     
    • Thanks Thanks x 1
  5. JasonG

    JasonG Regular Member

    Joined:
    May 28, 2009
    Messages:
    321
    Likes Received:
    92
    Occupation:
    Teacher, IM hobbyist
    Thanks guys, will try this out now. I'm not the most tech savvy, but I think I can figure this out. Thanks given :)
     
  6. OscarTgrouch

    OscarTgrouch Newbie

    Joined:
    Jan 1, 2011
    Messages:
    26
    Likes Received:
    3
    Occupation:
    Merchant Processing
    I might be misunderstanding but depending on what theme you are using you usually can find the /body tag in the footer file of your theme.

    In wordpress it will build as follows. index -> header -> sidebar -> footer

    Unless you are using something wierd.
     
  7. Autumn

    Autumn Elite Member

    Joined:
    Nov 18, 2010
    Messages:
    2,197
    Likes Received:
    3,041
    Occupation:
    I figure out ways to make money online and then au
    Location:
    Spamville
    In WP, the </body> tag will probably be inside footer.php, ie. inside wp-content/themes/yourthemename/footer.php.

    Very occasionally it will be in the bottom of the file that generates the page body ie. index.php, single.php, category.php, archive.php etc - but generally it's in footer.php so check there first.
     
  8. JasonG

    JasonG Regular Member

    Joined:
    May 28, 2009
    Messages:
    321
    Likes Received:
    92
    Occupation:
    Teacher, IM hobbyist
    okay - so i guess I am still kind of lost

    I understand how to view the source of my site, and I found where the </body> is - pretty much at the bottom, but how do I get to it via the file within filezilla access it and change it or paste in the code for the script? is it going to be in the public_html folder? after I go into that there are like 10 other folders and about 20 little white looking file things (like I said I am not tech savvy) lol
     
  9. Autumn

    Autumn Elite Member

    Joined:
    Nov 18, 2010
    Messages:
    2,197
    Likes Received:
    3,041
    Occupation:
    I figure out ways to make money online and then au
    Location:
    Spamville
    FTP into the directory into which you uploaded your WP site.

    Say your theme name is "thesis":

    Then you would navigate to wp-content/themes/thesis.

    Then look for the file called "footer.php" and open it.

    You should see the closing </body> tag in there, and you can insert whatever code you need into the file and save it (or upload it to the right place if you were editing it locally on your PC).

    I would highly recommend learning some basic html, it is absolutely essential to making money online.
     
    • Thanks Thanks x 1
  10. JasonG

    JasonG Regular Member

    Joined:
    May 28, 2009
    Messages:
    321
    Likes Received:
    92
    Occupation:
    Teacher, IM hobbyist
    Thanks Autumn - I was able to find the footer file, but, within it when I opened it to edit it I didn't see that body tag anywhere within that...

    this is like a freakin' needle in a haystack situation lol
     
  11. Autumn

    Autumn Elite Member

    Joined:
    Nov 18, 2010
    Messages:
    2,197
    Likes Received:
    3,041
    Occupation:
    I figure out ways to make money online and then au
    Location:
    Spamville
    Try looking in all the .php files (index.php, single.php etc) in the base directory of your site. It's possible that thesis uses some funny structure instead of including the closing </html> tag in the footer.
     
  12. JasonG

    JasonG Regular Member

    Joined:
    May 28, 2009
    Messages:
    321
    Likes Received:
    92
    Occupation:
    Teacher, IM hobbyist
    okay, I found it in frameworks.php pasted the script in right before the body tag, and when I refreshed the site it gave me this...


    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/wptest/public_html/wp-content/themes/thesis_18/lib/html/frameworks.php on line 24
     
  13. Autumn

    Autumn Elite Member

    Joined:
    Nov 18, 2010
    Messages:
    2,197
    Likes Received:
    3,041
    Occupation:
    I figure out ways to make money online and then au
    Location:
    Spamville
    What was the script your inserted into the page? PHP or javascript? Chances are that there is a single or double quote in your inserted script that you need to escape with a backslash.

    eg. you will probably have to turn this:

    '

    into this:

    \'

    or this:

    "

    into this:

    \"

    or there could just be an error in the script you inserted.
     
  14. JasonG

    JasonG Regular Member

    Joined:
    May 28, 2009
    Messages:
    321
    Likes Received:
    92
    Occupation:
    Teacher, IM hobbyist
    Code:
    <script src="peel/peel.js" type="text/javascript"></script>
    was the script I was trying to use - so I guess javascript. is this not going to work then?
     
  15. Autumn

    Autumn Elite Member

    Joined:
    Nov 18, 2010
    Messages:
    2,197
    Likes Received:
    3,041
    Occupation:
    I figure out ways to make money online and then au
    Location:
    Spamville
    It should work. If the html is being printed via PHP then you will need to escape the double quotes in that script with backslashes, ie. try changing the script to:

    Code:
    <script src=\"peel/peel.js\" type=\"text/javascript\"></script>
    
     
  16. JasonG

    JasonG Regular Member

    Joined:
    May 28, 2009
    Messages:
    321
    Likes Received:
    92
    Occupation:
    Teacher, IM hobbyist
    Okay Autumn - so I put that code in right before the body tag, it didn't cause any errors when I opened the site, but it isn't doing what it is supposed to do...

    You know the peel backs at the top corner of websites? That is what this is supposed to do but, no luck...

    Could I PM you with a few more details? I don't want to get too specific and blow up my site/niche...
     
  17. Autumn

    Autumn Elite Member

    Joined:
    Nov 18, 2010
    Messages:
    2,197
    Likes Received:
    3,041
    Occupation:
    I figure out ways to make money online and then au
    Location:
    Spamville
    Unfortunately beyond telling you to check the path to your javascript on your server to make sure it's correct, there's not much more I can tell you without poking around your full setup. You can try looking for javascript errors using the Firefox javascript console (Tools > Error Console) which will print a list of javascript errors.
     
  18. OscarTgrouch

    OscarTgrouch Newbie

    Joined:
    Jan 1, 2011
    Messages:
    26
    Likes Received:
    3
    Occupation:
    Merchant Processing
    After reading more of this i am pretty sure there are some page peal plugins that would be easier for you to use and set up.

    http://wordpress.org/extend/plugins/page-peel/
    http://wordpress.org/extend/plugins/jquery-page-peel/

    There is a flash and a jquery version. There are a ton more.