Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Hiding AMP element in “Transitional” mode

$
0
0

Replies: 1

Hi!

I am currently trying AMP on my website in “Transitional Mode”. I followed amp-user-notification documentation to create simple cookie notice bar at the bottom. It’s simple and it works just fine, here’s the code

<amp-user-notification
layout=”nodisplay”
id=”amp-user-notification1″
>
This website uses cookies.
Learn more about your privacy.
<button on=”tap:amp-user-notification1.dismiss”>Got it!</button>
</amp-user-notification>

I inserted it into footer. The problem is that this notice bar is also visible on non-AMP webpages.

I managed to hide it via “Ad inserter” plugin which has a feature to separate non-AMP and AMP codes. But I would welcome more elegant and “native” solution, if there’s any.

Sorry if I am asking in wrong place.

Thanks.


Viewing all articles
Browse latest Browse all 59525

Trending Articles