Skip to content

Instantly share code, notes, and snippets.

@laras126
Created March 20, 2011 23:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laras126/878782 to your computer and use it in GitHub Desktop.
Save laras126/878782 to your computer and use it in GitHub Desktop.
wpalchemy in functions.php
<?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