Last active
August 29, 2015 14:16
-
-
Save cliffordp/f8cc3dd596f5a59b5864 to your computer and use it in GitHub Desktop.
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 characters
| <?php | |
| // From http://www.pagelinestheme.com/disable-dms-regions-per-page/ | |
| //Disable Fixed, Header, and Footer on all these Page IDs | |
| add_filter( 'pl_setting-region_disable_fixed', 'customize_templates_by_page' ); | |
| add_filter( 'pl_setting-region_disable_header', 'customize_templates_by_page' ); | |
| add_filter( 'pl_setting-region_disable_footer', 'customize_templates_by_page' ); | |
| function customize_templates_by_page() { | |
| //could choose to still show for Admins (e.g. copy content from footer to template) | |
| //if( current_user_can('edit_theme_options') ) { return false; } | |
| global $post; | |
| $pageids = array( | |
| 182, //http://example.com/snowy/ | |
| 219, //http://example.com/rainy/ | |
| ); | |
| if(is_page($pageids)) { | |
| return true; // true is checkbox ticked | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment