Forums

[resolved] wp_head() outputting just before opening tag. (3 posts)

  1. joel@ahso
    Member
    Posted 1 year ago #

    greetings and salutations,

    we're using WP 3.0.5 with twentyten and we's made a twentyten-child theme

    i can has an odd problem,

    the stuff i hook into the wp_head is outputting outside the </head> and right after the <body>

    if you go here,

    maximum artists creative

    and open up firebug, or Google Chrome's mega-inspector you'll see i've hooked a function "effed_in_the_wp_head" into the wp_head() all this function does is echo "phreaking awesome"
    you can see it, right below the opening body tag.

    everything looks cool in my header.php and functions.php

    here's the custom header.php
    wp_head(); is called on line#51
    and here's the custom functions.php file
    starts on line#34
    with any luck it's just an unclosed tag or some other teeny wicked thing i can't spot.
    another set of eyes would be greatly appreciated.

    well what the heck. now it's working. well, sort of, the function that echoes "phreaking awesome" still gets dumped in the body tag and now my other stuff is back in the <head> where it belongs.

    anybody got any idea what's going on? Daddy's stumped. Probably been stairing @ teh code too long.

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.maxartcreative.dreamhosters.com%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&group=0&user-agent=W3C_Validator%2F1.2#line-38

    look here, line 38

    Everything is good. Your echo is in the right place, just before the </head> in the code flo

    It just comes out wrong in your actual page because you are echoing text into the <head> section of your site, which you can't do.

    it has to be inside meta tags, or something

    You can't have any displayed elements echoed into the head

  3. joel@ahso
    Member
    Posted 1 year ago #

    oh awesome,
    well don't i feel silly.

    it still makes me wonder why it was dumping all my page_specifics() content into the body tag tho.

    no worries, better to feel silly and have it working, i have to confess i keep forgetting that the validator is an excellent bug-hunter.

    now i just have to figure out why the is_page() with an array of page slugs in it isn't returning true.

    thx again Rev!
    can has a good one!

Topic Closed

This topic has been closed to new replies.

About this Topic