• Resolved Alex

    (@alex4711)


    On our start page there is a featured area right below our logo. Everything worked fine but yesterday we noticed that the element <div class=”sp-container”> is empty. The non-amp page works fine. It is a generated page, so I can’t open it in the editor and check for AMP errors in WordPress itself.
    It seems that the contents got stripped but I failed to debug the cause. Any hints how I could proceed from here?
    Big thanks in advance for your time!

    • This topic was modified 5 years, 5 months ago by Alex.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Pascal Birchler

    (@swissspidy)

    Hi there

    It looks like the <div class="sideslides"> element within that container has the CSS rule visibility: hidden; applied, which makes it invisible.

    On your non-AMP page, there seems to be some JavaScript that makes it reappear by overriding it with visibility: visible. Since AMP does not allow custom JavaScript, this is not happening on the AMP version of the site.

    To resolve this, please follow these steps:

    1. In your WordPress admin, go to Appearance -> Customize
    2. Click on “Additional CSS”
    3. Insert the following CSS: html[amp] .sideslides { visibility: visible; }
    4. Save changes and visit your homepage again

    Please let me know if that helped.

    Thread Starter Alex

    (@alex4711)

    Hi Pascal,
    Yes, this actually fixed the problem. Now I can look a little bit deeper into this issue.
    Thanks a lot, you saved me a lot of time! ??

    Thread Starter Alex

    (@alex4711)

    Issue is solved by adding custom css.

    Plugin Author Pascal Birchler

    (@swissspidy)

    Awesome, thanks for confirming Alex! That’s great to hear ??

    If you don’t mind to take a moment, we’re always happy about reviews of our plugin.

    Of course, if you have any more questions, feel free to open a new thread here as well.

    Thanks again,
    Pascal

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Single empty div element on start page’ is closed to new replies.