This shortcode is used to get the value of single post based either post ID or post slug. aw2_query_post can return a single value or a post object. Values from post object can be accessed using aw2_value.
It is slug of the post whose data you want to fetch.
If you have ID then you can get the post data using post ID.
If you use post slug, then you need to specify post_type for fetching the post data.
ID is used to specify unique identifier to the returned results, if not specified it defaults to default_item.
You can use main attribute to return single value from post data instead of post object
If using main you can save single value as param by specifying set_param.
You can use conditionals from aw2_if to control the execution of aw2_query_post.
p.s remove the space between “[” and “aw2” in the examples below, they have been added to avoid their execution on this page.
Getting post data using slug
Getting post data using post_id
getting single value of post object