[posts]

Displays posts. Check WP_Query page for more info on params.

Aliases: [wp_query].

Attributes

sep
(optional) Separator.
Default: <br>
max_posts
(optional) Max posts to return number.
Default: 10
output_format
(optional) Output format. Replaced values: %title%, %link%.
Default: %title%
post_type
(optional) Post type. Can be custom type, e.g.: product.
Default: post
post_status
(optional) Post status, e.g.: publish.
Default: any
orderby
(optional) Order by parameter, e.g.: date.
Default: title
order
(optional) Order (ASC or DESC).
Default: ASC

Examples

Example #1

Display five recently published products as list:

[posts max_posts="5" post_type="product" post_status="publish" orderby="date" order="desc" before="<h3>Recent Products</h3><ul><li>" sep="</li><li>" after="</li></ul>" output_format="<a href='%link%'>%title%</a>"]

Example #2

Display twenty recently published posts:

[posts max_posts="20" post_type="post" post_status="publish" orderby="date" order="desc" before="<h3>Recent Posts</h3>"]

Output #2

Recent Posts

[font_awesome]
[copyright]
[dashicon]
[wc_current_currency_code]
[wc_current_currency_symbol]
[total_categories]
[total_tags]
[total_taxonomy]
[login_url]
[youtube]
[google_map]
[wc_product_id]
[wc_product_price_html]
[progress]
[meter]
[total_users]
[option]
[wc_login_form]
[wc_product_dimensions]
[user_location]
No comments yet.

Leave a Reply