Exclude a div from amp pages,
-
Hi there!
I’m experimenting with an amp version of my site, and have run into a little problem. Is there a way to have a specific div class show on the normal version of my site, but not be included in the amp version? Ideally it would not just be hidden, but not be sent to the amp page at all. The reason is that have an adsense unit that I want to show on the regular pages, but not on the amp pages. The amp pages are just showing a blank square.I think maybe some variation of the below in functions.php might be a starting point, but I’m not sure. Any advice?
if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) { /* Code to be removed --- what would I put here to exclude a class?*/ }
Thanks in advance!
The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Exclude a div from amp pages,’ is closed to new replies.