1. Home
  2. Docs
  3. Content management
  4. Shortcodes
  5. Post list

Post list

Available as Elementor widget!

Since Rife theme in version 2.1.0 it is available as Elementor widget.

What is it for

Post list shortocode can be used to display lists of different post types. In our theme you can use it to display:

  • posts
  • albums
  • works
  • people

You can check example use here.

Post list will inherit layout from theme settings. So if you want to use post-list shortcode to display posts it will look exactly as your blog, no extra work required.

Same goes for other post types.

Example of posts list(works & people)

Shortcode and its parameters

First lets see some examples:

[a13fe-post-list type="post" orderby="title" posts="5" columns="3" filter="1"]
[a13fe-post-list type="people" orderby="title" posts="5" columns="2" filter="0" category="devs"]
[a13fe-post-list type="album" order="ASC" orderby="title" posts="20" columns="4" category="people,nature" filter="1"]
[a13fe-post-list type="album" order="ASC" orderby="title" posts="3" category="people+nature" filter="0"]
[a13fe-post-list type="work" orderby="title" posts="5" columns="2" filter="1"]

So shortcode is named a13fe-post-list and it has following parameters that you can use:

  • type – (default post) post type that you wish to display you can chose from
    • post
    • album
    • work
    • people
  • posts – (default 9) number of posts to display
  • columns – (default 3) number of columns
  • filter – (default 0) should filter be displayed. 0 or false means it is not displayed. 1 or true means it is displayed. It is useful if you have assigned categories to post type that you want to display.
  • order – (default ASC) order of posts based on orderby parameter. You can choose between ASC or DESC. It means ascending or descending order.
  • orderby – (default date) by what should posts be ordered. You have many options here as it accepts everything what is accepted by WP_Query. You probably will want to stick to basics, that are:
    • date
    • title
    • name
    • rand
    • modified
    • comment_count
  • category – (no default value) categories you wish your posts to be from. You should use category slug as parameter(see examples above). if you want to display post from few categories then connect them with comma like category="people,nature". If you want only posts that are posted in both categories then connect them with plus sign like category="people+nature".

 

Was this article helpful to you? Yes No 1