Dynamic Values

Dynamic values fetch and show data from a specific source. There are 3 types of dynamic values based on their source:

  • Global – values are specified site-wide and do not vary from page to page. Examples: site icon, site title, homepage URL, custom fields from the ACF Options page, etc.
  • Current page – values depend on the currently viewed page. Examples: post title, featured image, post taxonomy, custom field assigned to a page, etc.
  • Current Grid/List item – values depend on the post/page which corresponds to the Grid/List item. This is Zephyr specific, all those values can be used only via Grid Layouts. Examples: post title, featured image, post taxonomy, custom field, etc.

Text Dynamic Values #

Most options supporting dynamic values allow you to select them via the special popup. Click the "stack" icon on the right and see all available values.

Multiple Text Dynamic Values #

In case you need to use a dynamic value as a part of your text you can use special shorthands:

  • {{custom_field_name}} – shows the value from a custom field of the current page (post, product, term, etc.). All HTML tags will be stripped, that's why it's not possible to output images and other complex content. If the custom field doesn't exist, then returns an empty string.
  • {{option|custom_field_name}} – shows the value from a custom field of the ACF Options page, if it exists.
  • {{site_title}} – shows the site title from general settings
  • {{the_title}} – shows the current page title
  • {{post_type_singular}} – shows the name of the current post type (e.g. Post, Page, Movie, Video, Member)
  • {{post_type_plural}} – shows the name of the current post type in plural (e.g. Posts, Pages, Movies, Videos, Members)
  • {{comment_count}} – shows comments amount of the current post (or reviews amount of the current WooCommerce product)
  • {{post_count}} – shows the total amount of published posts
  • {{user_count}} – shows the total amount of registered users
  • {{today}} – shows the current date in "Ymd" format. Example: 20230831 is August 31, 2023
  • {{now}} – shows the current time in "His" format. Example: 162449 is 16:24:49
  • {{today_now}} – shows the current date and time in "YmdHis" format. Example: 20240101000000 is the beginning of 2024 year

Example with multiple dynamic values

The Real Estate demo has the following ACF fields:

2589.png

If you add the Text element with the following

{{storeys}}-storey house with living area of {{living_area}} sqm, with {{bedrooms}} bedrooms, located on a plot of {{land_area}} sqm.

text into the "House Page" Content template:

2590.png

After that, every house page will display values from its custom fields, like:

2591.png

Link Dynamic Values #

All link settings of theme elements allow to set a dynamic value via the special popup:

Link Dynamic Values can be:

  • Homepage – uses the link to the site front page
  • Clickable value (email, phone, website) – reads the element's label and converts it to the link if it contains the email, phone, or a URL
  • Post Link – uses the currently viewed post URL
  • Archive Page – uses the link to archive of the current taxonomy term
  • Open Image in a Popup – uses the link to the full size of the current image
  • Additional Settings: Custom Link – uses the value from the "Custom Link" field inside the "Additional Settings" block when editing a post (available for all post types)
  • Testimonial: Author Link – uses the value from the relevant option of the Testimonial post type
  • Author Archive – uses the archive link of all posts created by the current post author
  • User Website – uses the website URL of the current post author (if specified in their profile)
  • ACF fields with the following types: Email, URL, Link, File, Page Link, Post Object

Image Dynamic Values #

All image settings of theme elements allow to set a dynamic value via the special popup:

Image Dynamic Values can be:

  • Site Icon
  • Featured Image
  • Additional Settings: Images – uses the image(s) specified in the "Images" field inside the "Additional Settings" block when editing a post (available for all post types)
  • ACF fields with the following types: Image and Gallery