NOTE: This plugin is very much a work in progress., (*1)
A WordPress plugin that provides Easy, consistent cover media fields for WordPress and ACF Pro 5., (*2)
Requirements
- WordPress 4.5+
- Advanced Custom Fields Pro 5
Usage
This plugin requires a small change to your theme:, (*3)
Template Tag
Add the following template tag wherever you want cover images to appear in your theme:, (*4)
<?php acfci_cover(); ?>
Recommended CSS
In order for the cover image to look right, its immediate parent should have something like the following css:, (*5)
height: 100vh;
Layout Classes
Layout classes are added to the body tag and can be used to style the cover image in your theme's CSS, (*6)
Change where the Cover Image fields appear
By cover images are enabled for Pages, to define which post types cover images should be available on, declare theme support:, (*7)
$landing_page_templates = array(
array (
array (
'param' => 'post_type',
'operator' => '==',
'value' => 'page',
),
array (
'param' => 'page_template',
'operator' => '!=',
'value' => 'template-no-header-image.php',
),
),
);
add_theme_support( 'cover-image-location', $landing_page_templates );