Back to contents

JetEngine Macros Guide

Useful information

From this list you can learn everything concerning the macros codes available to use in JetEngine.

We have created special macros codes for JetEngine plugin, which allow calling certain functions. Using these macros in JetEngine widgets you will be able to query and display specific information on the page.

%related_children_from|post-type-slug% – this macros code is used for displaying only the child related posts. You need to paste it in Listing Grid widget (Posts Query block and here add a new item with the Posts Parameters type)

%related_parents_from|post-type-slug% – this macros code is used for displaying only the parent related posts. You need to paste it in Listing Grid widget (Posts Query block and here add a new item with the Posts Parameters type)

%current_id% – type in this macros in the Exclude posts by IDs field in the Posts Query > Posts Parameters query type of Listing Grid widget in order to let the query exclude the currently displayed posts on the page from the query.

Note: you can display either parent or child related posts, and the “|post-type-slug” stands for the actual post type slug (e.g., “events”)

%s – this macros stands for the value that is pulled, just add some content before and after it to add some text before and after the value in the Customize field input option of Dynamic Field widget.

%name% – this macros code and HTML markup (< span >< /span> or < div>< /div>) are used to format the repeater content in the Item Format field of Dynamic Repeater widget. You need to insert the particular IDs of the meta fields, which are included in the repeater to display the content added in the certain meta field (e.g., %text% – this is the macros that will help in displaying the content added in the Text meta field).

%media1|img_url_by_id% – insert this macros in the Item Format field of Dynamic Repeater widget to display the image URL link that will be pulled from the database.

%gallery1|img_gallery_grid% – insert this macros in the Item Format field of Dynamic Repeater widget to display the gallery in one of the repeater sub fields.

%link|post_url_by_id% – insert this macros in the Item Format field of Dynamic Repeater widget to add the Post URL that is added with ACF to the repeater sub field.

%current_categories% – in order to exclude the specific category term from showing up, add the Tax Query query type in Posts Query block and specify this marcos in the Taxonomy: Categories block in the Terms field.

%current_tags% – to exclude the specific tag from showing up, you need to add a new query item and then select the Tax Query query type and Tags in the Taxonomy field and type this macros in the Terms field and specify IN operator.

%queried_term% – insert this macros in the Terms field, settings Posts Query block (Type:Tax Query > Taxonomy: Category) in Listing Grid widget to display related posts from the specific term.

Hope, this guide will help you to use JetEngine functionality for displaying particular data with the help of provided macros.