Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 2.4 KB

containers.md

File metadata and controls

53 lines (35 loc) · 2.4 KB

Containers

Containers are large, single use template patterns based on the Visual Framework. They usually represent a horizontal slice of a page template like the header. Therefore, a page template can be defined as a stack of containers. They are registered similarly to plugin blocks but are not available in Gutenberg editor for normal pages.

Topics on this page:

Plugin Containers

The VF-WP plugin defines a custom post type vf_container and a set of PHP classes. Individual containers inherit the VF_Plugin class. Containers have metadata assigned to their respective posts. They can be configured under WP Admin > Content Hub > Containers on a per-site basis.

Child theme containers:

†1 Container has been deprecated.


Containers in Dynamic Templates

Templates are configurable container stacks that can be used to define preset dynamic theme templates.

Templates documentation →


Containers in Theme Templates

It is possible to hard-code containers into theme templates:

if (class_exists('VF_Breadcrumbs')) {
  VF_Plugin::render(VF_Plugin::get_plugin('vf_breadcrumbs'));
}

However it is preferable to use the template architecture described above.