Created
May 18, 2015 12:27
-
-
Save sky4git/321c2d9cfb458b17b805 to your computer and use it in GitHub Desktop.
Option tee add meta boxes to page template
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
// ref: http://themeforest.net/forums/thread/option-tree-metabox-and-page-templates/75063 | |
$post_id = (isset($_GET['post'])) ? $_GET['post'] : ((isset($_POST['post_ID'])) ? $_POST['post_ID'] : false); | |
if ($post_id) : | |
$post_template = get_post_meta($post_id, '_wp_page_template', true); | |
if ($post_template == 'template-home.php') ot_register_meta_box($my_meta_box); | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment