How to add custom meta box when you have a custom page template file
The front page configuration is a site option. You can know if the site is configured to display a page with get_option( ‘show_on_front’ ) and get the ID of the page with get_option( ‘page_on_front’ ). You could do something like this: add_action( ‘add_meta_boxes’, ‘cyb_add_metaboxes’, 10, 2 ); function cyb_add_metaboxes( $post_type, $post ) { if( $post->ID … Read more