Support » Fixing WordPress » text showing in wp_head, no idea where it comes from

  • Resolved RyanHoeppner

    (@ryanhoeppner)


    I’m running a blog for a friend, BookScribeBlog.
    As you can see there is some text in the top left hand corner, it seems to be coming from wp_head but I have no idea where this text is coming from. Please help!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Have you checked header.php?

    Thread Starter RyanHoeppner

    (@ryanhoeppner)

    Yes I have. In fact I found out through header.php that wp_head was causing the problem. It shows up if you look in the source in the browser, but it doesn’t show up in the header.php. It shows that it’s between
    <!– wordpress head functions –>
    and
    <!– end of wordpress head –>

    but in the code, the only thing there is <?php wp_head(); ?>

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Check functions.php for wp_head.

    Thread Starter RyanHoeppner

    (@ryanhoeppner)

    functions.php contains no wp_head.

    Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the Twenty Eleven theme to rule out any theme-specific problems.

    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    Thread Starter RyanHoeppner

    (@ryanhoeppner)

    Hi esmi,
    I have tried all of these,
    Switching to the 2011 theme got rid of the problem, the other 2 did not*. It must be something in the theme.

    It looks like somewhere in your theme there is a stray bloginfo(‘template_directory’) or similar php/wordpress function. Those will get echoed(displayed on the screen) before even the normal page outputs.

    Maybe you can place your header.php file into the paste bin? and we can find the culprit?

    Thread Starter RyanHoeppner

    (@ryanhoeppner)

    http://pastebin.com/t1KuKiQ9
    I hope this is what you were wishing for. Thanks for the reply.

    This is a guess, but in your functions.php file there is something on line 136 that says “bloginfo(‘template_url’)”. When a function that does not contain the word “get” as in, get_bloginfo(), that means it will output the information returned from the function to the browser.

    Try replacing that with “get_bloginfo(‘template_url’)” without the quotes of course.

    Note, that is not the best way to do this, but it may help your situation.

    Thread Starter RyanHoeppner

    (@ryanhoeppner)

    Ahaha I see the edit, thanks, I was curious 🙂

    Thread Starter RyanHoeppner

    (@ryanhoeppner)

    And, of course, that fixed it. THANK YOU SO MUCH! How can I repay you? Internet moneys?

    You are very welcome! hehe. No payment required! This is what makes wordpress great!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘text showing in wp_head, no idea where it comes from’ is closed to new replies.