Configuring Shortcode’s Sorting Settings

Updated on November 15, 2017

Some of the shortcodes allow you to alter the sorting of the posts based on the title, menu order, comment count and more.

To sort the posts, you need to complete two main steps. These steps include editing the shortcode’s settings and then selecting the appropriate options for the Order and Orderby settings. In this article, we use the Blog shortcode and explain the process from scratch.


Displaying Posts

Creating a Blog Post

In order for the blog shortcode to have something to display, blog posts must be created. Please read the Creating a blog post article for more information, and then return to the steps below.

Adding the Blog Shortcode

To add the shortcode:

1Add a new page or edit an existing page.
2From the WPBakery Page Builder screen, click on the + button.
3In the Add Element pop-up screen, search for Blog and click on it to be added to the page.

sorting - Blog

4When the shortcode is added, a new pop-up screen called Blog Settings will open. You can configure different aspects of the blog from the pop-up.

sorting - Blog settings

5Click on Save Changes and publish or update the page to check the result. It will show all the available blog posts.

Altering Sorting

There are two options in the Blog Settings pop-up called Order and Orderby. These two options can be found in many other shortcode settings pop-up.

The Orderby setting let’s you alter the sorting of posts by one of these parameters: date, menu order, post ID, title, comment count, random, author and no order. The order setting designates the ascending or descending order of the ‘orderby’ parameter.

Reverse Chronological Posts Order

As an example, to display the newest blog posts first, Order and Orderby settings have to be configured as shown below:

sorting - posts order

Did this answer your question?