Support » How-To and Troubleshooting » [Resolved] wp_head tag moving page down

[Resolved] wp_head tag moving page down

  • I’m new at building websites using wordpress. I’ve been working on a personal, my first attempt at converting to a WP friendly one and I’m not understanding why the php wp_head tag is pushing my page down. When it’s removed everything is the way it should be with the header at the top of the browser but as soon as I add it it’s knocking the whole thing down. Any help is much appreciated. You can see what I mean if you go to the site I’m working on http://danielpaymar.com

Viewing 12 replies - 1 through 12 (of 12 total)
  • The blank area is for a slideshow. It is probably either built into your theme or created by a plugin.

    Look for theme options or a plugin related to a slideshow.

    vtxyzzy – yes the blank area is the nivo-slider but it’s not the plugin. i built the theme and all though the images are not showing up that is not my main problem. my problem is that the wp_head tag is moving my entire page down, adding a padding or margin to the top.

    Can the margin be seen on the current home page?

    If yes, please explain exactly where it is located.

    If no, please add the wp_head function back so it can be seen.

    Something in your theme, or a plugin, is probably using the wp_head action hook to add content to the page. If there is no content defined, it may just add a blank line or something else that takes up space.

    If the problem can be seen on the screen, the source code of the screen can be examined to see what is being added. That may provide a clue to the source.

    You can read about wp_head here:


    Yes the margin can be seen, at least I see it. Basically the tip of the paper with my name on it should be touching the top of the browser. You should not be able to see the background texture.

    I have no plugins currently being used on my theme so i don’t think that’s the problem. The wp_head function is being used but i’m unsure you’d be able to see it since it’s php?

    i’m at total loss here since i don’t really know php.



    Forum Moderator

    FYI, the page displays as you want it (if I’m understanding your description) in Firefox on a Mac… i.e. there is no gap above the header.

    It also displays correctly in IE9.

    Actually, there is one plugin that is inserting some javascript in the head section as evidenced by this line:

    <script type="text/javascript" src="http://danielpaymar.com/wp-content/plugins/cms/js/faq-frontend.js">

    Look for a plugin named ‘CMS’ and disable it.

    i deactivated the CMS plugin and the gap remains.

    ok so i think i found out what is causing the problem. when i wrapped the wp_head in HTML comments this is showing up, from where I don’t know since those styles are not in my CSS file.

    <style type=”text/css” media=”print”>#wpadminbar { display:none; }</style>
    <style type=”text/css” media=”screen”>
    html { margin-top: 28px !important; }
    * html body { margin-top: 28px !important; }

    I believe that code is for the ‘Admin Bar’ that WP puts at the top of the screen. There are several plugins that will let you control when that is used.

    You’re right…not sure why the usual dialogue wasn’t showing up, that was causing my confusion. It just looked like a blank space. Thanks for the help!

    If your problem has been solved, please use the dropdown on the right to mark this topic ‘Resolved’ so that anyone else with this question can see that there is a solution.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] wp_head tag moving page down’ is closed to new replies.
Skip to toolbar