This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Reply To: Add Post/Page Meta Options

#440
Jason Bobich
Keymaster

Hello,

The filters you want to use are called “themeblvd_page_meta” and “themeblvd_post_meta”. In order to see how the array is structured to utilize it, you can see where it’s applied here:

/framework/admin/functions/meta.php

Basically, within the “options” portion there is smaller array for each option. Here’s an article that shows you how to format these individual options:

http://dev.themeblvd.com/tutorial/formatting-options/

So, let’s say you wanted to add a text option to the Post options meta box. It would look something like this:

function my_post_meta( $config ){
	$config['options'][] = array(
	    'name'      => 'Example Option',
	    'desc'      => 'This is the description for the option.',
	    'id'        => 'example_option',
	    'std'       => 'default value for option',
	    'type'      => 'text'
	);
	return $config;
}
add_filter( 'themeblvd_post_meta', 'my_post_meta' );

And then it would be retrieved like this:

get_post_meta( $post->ID, 'example_option', true );