Documentation / Tutorials / Tutorials & How to’s
List of Commonly Used shortcodes
/ Tutorials & How to’s / List of Commonly Used shortcodes
Shortcode | Description | Example |
---|---|---|
[aw2.get function.get_option p1='blogname'] | Site name | gives you name of the site |
[aw2.get function.site_url] | Site URL | give site url of the site |
[aw2.get item.post_title] | Post Title | Use post instead of item for single post |
[aw2.get item.post.url] | Post URL | Use post instead of item for single post |
[aw2.get item.post.featured_image] | Featured Image | Use post instead of item for single post |
[aw2.get item.post.featured_image_url] | Featured Image URL | Use post instead of item for single post |
[aw2.get item.post.excerpt] | Post excerpt | Use post instead of item for single post |
[aw2.get item.post_content] | Post content | Use post instead of item for single post |
[aw2.get item.post_name] | Post Slug | Use post instead of item for single post |
[aw2.get item.author.display_name ] | Post Author | Use post instead of item for single post |
.taxonomy.all.taxonomyname .taxonomy.ids.taxonomyname .taxonomy.slugs.taxonomyname .taxonomy.names.taxonomyname |
Post Taxonomy | [aw2.get item.taxonomy.all.names.job_group.comma /] [aw2.get item.taxonomy.ids.names.job_group.comma /] [aw2.get item.taxonomy.slugs.names.job_group.comma /] [aw2.get item.taxonomy.names.job_group.comma /] |
[aw2.get item.meta.metafieldname /] | Post Meta | Use post instead of item for single post [aw2.get item.meta.joblocation /] |
[aw2.get app.path]/[aw2.get item.post_name /] | Returns url of post within app in loop | Use post instead of item for single post |
[aw2.query get_post post_id=] [aw2.query get_post post_id=1 set='a' /]
[aw2.get a.post_title]
|
Post queries Return post title from post ID 24 |
[aw2.query get_post post_id=24] [aw2.query get_post post_id=1 set='a' /] [aw2.get a.post_title]
|
[aw2.query posts_builder part=start] { "posts_per_page": [aw2.get module.posts_per_page default=100 /], // number of posts "post_status": "publish", "post_type":"as_task", //custom post type as_task "paged":"[aw2.get request.paged default=1 /]", // which page "order":"desc", "orderby":"date" } [/aw2.query] [aw2.query posts_builder part=run set="module.tasks" /] |
Post Loop | example |
[aw2.get item.author_meta.email /] | Post Author Email | Use this to get email of the post author while in loop |
[aw2.get attachment attachment_id='2' set="module.file" /] | Attachement details | Given an attachment id, it returns the name, URL, absolute path and meta information of an attached file. |