Hide an element from specific page in WordPress

<?php if(is_page(xxxx))?> <style> /* the code to display this div goes here. */ </style> <?php endif;?> /** * User Contributed Notes * //When any single Page is being displayed. * is_page(); * // When Page 107 (ID) is being displayed. * is_page( 107 ); * // When the Page with a post_title of "Contact" is being displayed. * is_page( 'Contact' ); * // When the Page with a post_name (slug) of "contact-us" is being displayed. * is_page( 'contact-us' ); */

1 Response

Using this snippet you can hide some elements from specific page in WordPress

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.