How to add custom css for amp pages?
-
Hi,
I am using transactional mode with GeneratePress theme.
I want to know how can I add custom css for amp pages?
I used the next code, but the css didn’t show.
Other code I added with this function (like analytics and more – yes shown on the site)function add_to_body_amp() { if ( function_exists( 'amp_is_request' ) && amp_is_request() ) { ?> <style>amp-ad[type=adsense], amp-ad[type=doubleclick] {max-width: 100vw;}</style> <?php } } add_action('wp_body_open', 'add_to_body_amp');
So is there another option to add custom CSS code?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to add custom css for amp pages?’ is closed to new replies.