Created
August 30, 2018 09:24
-
-
Save andrewlimaza/b5f096692f5377b793db2e671564f4b9 to your computer and use it in GitHub Desktop.
Revisions
-
andrewlimaza created this gist
Aug 30, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ <?php /** * This will hide a site's logo and entire footer from specific pages. * Add this code to your child theme's functions.php or custom plugin. * Adjust the $pages_to_hide array with page slugs that you would like to hide the footer and site logo on. */ function memberlite_hide_logo_and_footer_on_some_pages() { // Use page slugs in a comma separated list. $pages_to_hide = array( 'page-slug-1', 'page-slug-2', 'page-slug-3', ); if ( is_page( $pages_to_hide ) ) { ?> <style type="text/css"> .site-branding { display:none; } footer{ display:none; } </style> <?php } } add_action( 'wp_head', 'memberlite_hide_logo_and_footer_on_some_pages' );