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:
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.
- Banner
- Beta †1
- Breadcrumbs
- EBI Global Footer
- EBI Global Header
- EMBL News
- Global Footer
- Global Header
- Hero
- Masthead
- Navigation
Child theme containers:
†1 Container has been deprecated.
Templates are configurable container stacks that can be used to define preset dynamic 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.