How to show metabox on page if it is using a template

Use the page-specific meta box hook & accept the $post object that’s passed to it – then you can check if it currently has a page template of sky-template.php. add_action( ‘add_meta_boxes_page’, function ( $post ) { if ( $post->_wp_page_template === ‘sky-template.php’ ) { add_meta_box( ‘sky_page_excerpt’, ‘SkyScraper Page Excerpt and Links’, ‘sky_page_excerpts’, ‘page’, ‘advanced’, ‘high’ ); … Read more

Replace theme function

If the Theme is well developed they wrapped functions in an if (!function_exists(something)) So the you can overwrite just the function by having it in your child themes function.php You may also check if your theme provides hooks and filters to customize behaviour. If that isn’t the case you can either do what you already … Read more