WordPress.org

Ready to get started?Download WordPress

Forums

Per page add to head
[resolved] Whitespace at the top of website (3 posts)

  1. dov777
    Member
    Posted 3 months ago #

    Hello Erikvona

    I added analytics to all pages and then saw a whitespace at the top of site http://rocksters.co.uk/

    I tried uninstalling although I'd really like to keep on using your plugin but sometimes you have to cut your loses instead of trying to fix. Anyway the whitespace remained. I reinstalled to see if I left a space by mistake before uninstalling.

    Now Im not sure what to do, do you think I should try useing css to close the gap?

    Many thanks for any help

    https://wordpress.org/plugins/per-page-add-to/

  2. dov777
    Member
    Posted 3 months ago #

    It must be the template Im using that creates the whitespace with certain plugins that effect the head. The better wordpress xml sitemap plugin was doing the same thing.

    I have added a top margin -23px to the css to remove the top whitespace. It only happens on pages where I add per page facebook and adwords tracking, the overall analytics trackng is fine.

    Cool plugin thanks

  3. Erikvona
    Member
    Plugin Author

    Posted 3 months ago #

    As far as I know, this should not happen.

    It can happen, though, if you have a HTML invalid page. That will cause the head tag to close early, and in some situations, can cause the browser to display whitespace where it shouldn't.

    I found multiple errors trying to validate your site (see the w3 validator). The error that is most likely to be responsible for this behaviour, is that your head segment contains two different <title> tags:

    <title>Rocksters Live Party & Wedding Band For Hire </title>
    <title>Rocksters Live Party Wedding Band For All Events</title>

    Note that this plugin only puts the things you give it into the head section, nothing else (no HTML comments or things like that). So if you don't add whitespace, it won't be displayed.

    As far as I know, this issue is not directly related to my plugin. My plugin only inserts what you give it, so any issues involving the layout of a site, are probably related to what you are adding in the head segment.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.