Created
March 5, 2014 00:34
-
-
Save whyisjake/9358868 to your computer and use it in GitHub Desktop.
Conditionally load a easy custom field.
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 ( is_page_template( 'page-weekend-projects-2013.php' ) ) { | |
/** | |
* Add a meta box on the weekend projects page. | |
*/ | |
$field_data = array ( | |
'title_takeover' => array( | |
'fields' => array( | |
'first_row' => array( | |
'label' => 'First Row', | |
'hint' => 'Use this to create a custom shortened title.', | |
'type' => 'text', | |
), | |
'second_row' => array( | |
'label' => 'Second Row', | |
'hint' => 'Use this to create a custom shortened title.', | |
'type' => 'text', | |
), | |
), | |
'title' => 'Weekend Projects Sliders', | |
'context' => 'advanced', | |
'pages' => array( 'page' ), | |
), | |
); | |
$easy_cf = new Easy_CF( $field_data ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment