Home Plugins acf timber integration
ACF Timber Integration logo

ACF Timber Integration

by Dream Production on WordPress.org

Automatically enables in the Timber twig context variable all user-defined advanced custom fields.

(1)

This plugin is intended for developers that are using Advanced Custom Fields and Timber to develop their themes.

By enabling this plugin the user-defined advanced custom fields will be available in the Timber context variable as follows:

  • Fields defined for settings pages will be available everywhere under the “options” key
  • Fields defined for posts, pages and custom post types will be available on the \Timber\Post object under the “fields” key
  • Fields defined for terms will be available on the \Timber\Term object under the “fields” key
  • Fields defined for users will be available on the \Timber\User object under the “fields” key

  • Defined menus will also be available everywhere under the “menus” key

Also adds twig functions for images:

  • srcset – used to generate srcset attribute tag.
    Usage:
  • image_attr – used to generate srcset, width, height and alt.
    Usage:
Active installations300+
Weekly downloads
17-5.56%
Version1.4.0
Last updated2/10/2021
WordPress version3.7
Tested up to5.6.14
Tags
acfadvanced custom fieldsintegrationTimbertwig
ACF Timber Integration | Plugin0