Created
March 20, 2011 23:23
-
-
Save laras126/878782 to your computer and use it in GitHub Desktop.
wpalchemy in functions.php
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 | |
// custom constant (opposite of TEMPLATEPATH) | |
define('_TEMPLATEURL', WP_CONTENT_URL . '/' . stristr(TEMPLATEPATH, 'themes')); | |
include_once 'WPAlchemy/MetaBox.php'; | |
// include css to style the custom meta boxes, this should be a global | |
// stylesheet used by all similar meta boxes | |
if (is_admin()) | |
{ | |
wp_enqueue_style('custom_meta_css', STYLESHEETPATH . 'custom/meta.css'); | |
} | |
$artworkinfo_metabox = new WPAlchemy_MetaBox(array | |
( | |
'id' => '_custom_meta', // underscore prefix hides fields from the custom fields area | |
'title' => 'Artwork Info', | |
'template' => STYLESHEETPATH . 'custom/artwork-meta.php', | |
'context' => 'normal', | |
)); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment