I am utilizing the following code to add an additional three Featured Images to homepages in a multisite installation:
if (class_exists('MultiPostThumbnails')) {
new MultiPostThumbnails(
array(
'label' => 'Core Home Image 1',
'id' => 'core-home-1',
'post_type' => 'page'
)
);
new MultiPostThumbnails(
array(
'label' => 'Core Home Image 2',
'id' => 'core-home-2',
'post_type' => 'page'
)
);
new MultiPostThumbnails(
array(
'label' => 'Core Home Image 3',
'id' => 'core-home-3',
'post_type' => 'page'
)
);
}
The new edit page widgets are displaying and functioning as they should, however, they are appearing on all edit pages. How do I force WordPress to only display them on the pages that use a specific template, i.e. Core Front Page Template (wp-content/themes/mytheme/templates/core-front-page.php)?
Thanks in advance for your help.