WordPress.org

Ready to get started?Download WordPress

Forums

Parent Theme Briefly Visible (6 posts)

  1. ElwoodP
    Member
    Posted 2 years ago #

    I have a wordpress site setup running a child theme. Occasionally when a page is loading for a fraction of a second you can see the parent theme (especially on the first load of a page after the browser cache is cleared).

    I have fixed this by placing two pieces of CSS:
    One at the start of the first style sheet to load (style.css in the parent theme):

    body {
    display:none;
    }

    And one at the end of the last(style.css in the child theme).

    body {
    display:inline;
    }

    So the page isn't visible until all style sheets are loaded and no flash of parent theme occurs.

    This seems to work great but I'm just wondering if this method is advised or if there is a better one? Are there any SEO implications - will Google see this as black hat?

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    What parent theme are you using?

  3. ElwoodP
    Member
    Posted 2 years ago #

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    As you are using a commercial theme, I think you need to have a word with the theme's vendors about the "flash" from the parent theme. I don't think your fix will affect your SEO but I couldn't say for sure. Either way, this really does need fixing in the parent theme.

  5. ElwoodP
    Member
    Posted 2 years ago #

    Is this not just a problem with the way that child themes work/browsers load pages (I.E. The page loads parent theme's css parts of which are subsequently superseded by child themes css, and the browser displays page whilst it is loading, catching this happening).

    It doesn't seem to me that there is a problem with the parent theme.

    I thought this might be a common problem?

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    It's not a problem in any of the themes that I've created or with the Twenty Ten/Twenty Eleven themes. And I've not seen this kind of issue reported here either. So, no - I'd say that it's not a common problem. My best guess is that this is some sort of javascript issue in the parent theme.

Topic Closed

This topic has been closed to new replies.

About this Topic