Last active
May 10, 2018 15:33
-
-
Save territutich/e360f9534e616960485e7a20d8d5a8a3 to your computer and use it in GitHub Desktop.
This file contains 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 | |
/** | |
* If page uses a specific template, load meta boxes | |
* | |
*/ | |
add_action('add_meta_boxes', 'add_standardpg_meta'); | |
function add_standardpg_meta() { | |
global $post; | |
$pageTemplate = get_post_meta($post->ID, '_wp_page_template', true); | |
if($pageTemplate != 'page-high-level-child.php' && $pageTemplate != 'page-db-template.php' ) { | |
add_meta_box( | |
'contact_metaboxes', // $id | |
'Contact Information', // $title | |
'add_contact_metaboxes', // $callback | |
'page', // $page | |
'normal', // $context | |
'high'); // $priority | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment