Is there a way to add fields to specific pages like the home page?
I did try using the slug with no luck
function wcd_tradie_theme_page_meta_boxes( $meta_boxes ) {
global $post;
$frontpage_id = get_option('page_on_front');
$post = get_post($frontpage_id);
$frontpage_slug = $post->post_name;
$meta_boxes[] = array(
'title' => __( 'Call To Action', 'wcd-tradie' ),
'post_types' => $frontpage_slug,
'fields' => array(
array(
'id' => 'cta_title',
'name' => __( 'Title', 'wcd-tradie' ),
'type' => 'textarea',
'std' => __( 'HELLO & WELCOME', 'wcd-tradie' ),
),
),
);
return $meta_boxes;
}
add_filter( 'rwmb_meta_boxes', 'wcd_tradie_theme_page_meta_boxes' );