Toolbox for Beaver Builder

Useful Twig parameters

When using Twig you will be using the same post parameters over and over again. Here's a overview of some of the most useful parameters that are available.

Post Object

{{post.title}}
{{post.content}}
{{post.post_date}}
{{post.post_modified}}
{{post.thumbnail}}
{{post.link}}
{{post.parent}}
{{post.status}}
{{post.type}}
{{post.slug}}
{{post.date}}
{{post.author}}
{{post.name}}
{{post.menu_order}}
{{post.comment_count}}
{{post.modified}}

Post Terms Object

{{post.terms}}

{% for term in post.terms %}
    {{ term.id }}
    {{ term.slug }}
    {{ term.name }}
    {{ term.taxonomy }}
    {{ term.parent }}
{% endfor %}

Post Author Object

{{post.author}}

{% for item in post.author %}
    {{ item.object_type }}
    {{ item.name }}
    {{ item.display_name }}
    {{ item.description }}
    {{ item.avatar }}              (array)
    {{ item.first_name }}
    {{ item.last_name }}
    {{ item.user_nicename }}
    {{ item.user_email }}
    {{ item.user_url }}
{% endfor %}

Site Object

{{ site.name }}
{{ site.description }}
{{ site.url }}
{{ site.home_url }}
{{ site.site_url }}
{{ site.language }}

{{site.theme }}           (array)

{% for item in site.theme %}
    {{ item.name }}
    {{ item.version }}
    {{ item.parent }}
    {{ item.uri }}
{% endfor %}

User Object

{{ user.name }}
{{ user.first_name }}
{{ user.last_name }}
{{ user.nickname }}
{{ user.nicename }}
{{ user.wp_capabilities }}
{{ user.administrator }}
{{ user.wp_user_level }}
{{ user.url }}
{{ user.registered }}
Last modified: October 30th, 2018