How to add a code snippet only in two pages?
-
Hi guys,
I need to add a PHP Snippet, and a CSS Snippet in two pages only. How do I do that?
This is the PHP Snippet:
add_filter('perfmatters_lazyload_youtube_thumbnail_resolution', function($resolution) { if(!wp_is_mobile()) { $resolution = 'maxresdefault'; } return $resolution; });
I found in your documentation that I could add this line of code at the beginning:
if ( ! is_page( array( 'Homepage', 'Guatemala Tours' ) ) ) return;
Is that correct?
This is the code for the CSS Snippet:
.hc-back { overflow: hidden; } .hc-front { transform: translatey(100%); transition: 200ms ease-in-out; } .hc-back:hover .hc-front{ transform: translatey(0%); }
and, what would I use for the CSS Snippet?
Thank you in advance for your help!
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to add a code snippet only in two pages?’ is closed to new replies.