Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Prevents problems with websites where META BOX Plugin is not installed */
- if ( ! function_exists( 'rwmb_meta' ) ) {
- function rwmb_meta( $key, $args = '', $post_id = null ) {
- return false;
- }
- }
- /*
- Adds a custom meta box for the META BOX Plugin
- Plugin URL: http://wordpress.org/plugins/meta-box/
- */
- add_filter( 'rwmb_meta_boxes', 'reviewer_ilovewp_meta_boxes' );
- function reviewer_ilovewp_meta_boxes( $meta_boxes ) {
- $meta_boxes[] = array(
- 'title' => __( 'Custom Post Meta', 'reviewer' ),
- 'post_types' => 'post',
- 'fields' => array(
- array(
- 'id' => 'product-rating',
- 'name' => __( 'Product Rating', 'reviewer' ),
- 'type' => 'text',
- ),
- array(
- 'id' => 'product-price',
- 'name' => __( 'Product Price', 'reviewer' ),
- 'type' => 'text',
- ),
- array(
- 'id' => 'product-profile',
- 'name' => __( 'Product Profile', 'reviewer' ),
- 'type' => 'textarea',
- ),
- ),
- );
- return $meta_boxes;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement