Display banner

Parameters

$args optional An array of display options. Specific arguments are explained below.
type Defaults to current post type The banner preset to load. This can be a custom post type or a predefined location such as blog.
file Defaults to default The PHP file that is to be displayed on the page (sans the .php extension)
group Defaults to group_57222a6aad633 The internal ACF group that is used to pull field keys from. It currently defaults to "(Banner) Default".
post_id Defaults to false The specific post to pull banner details from. Leaving as false will pull the current post id. This is most useful for pages where the banner render occurs outside of the main WordPress loop such as Archives or Categories.

Examples

Basic usage on new post types

                        
1Banner::render();

Setting up a new banner group

                        
1Banner::render([
2 'group' => 'group_582d17dfe568d',
3 'file' => 'home',
4]);

Adding the default banner to a custom post type that doesn't use the internal loop

                        
1Banner::render([
2 'type' => 'woocommerce',
3]);