Blog Shortcode

Last Updated on

Express yourself to the world, share your thoughts and your passions using the blog shortcode. Blog is the most common and most popular section on websites.

In this article, we explain about displaying blog posts via Blog shortcode and configuring the shortcode settings.

To see the Blog shortcode in action, you may check the demo page.

In this article

Creating Blog Posts

Before adding blog shortcode and displaying the posts, blog posts itself should be created. To learn about creating a different kind of blog posts, read Creating a blog post article then continue to the next section.

Displaying Blog Posts

After creating blog posts, it’s time to display them on a page. For this purpose, we need to add Blog shortcode in a page.

Adding Blog Shortcode

To add the shortcode:

Add a new page or edit an existing page.
Note: If you set one of your pages to be the default blog page from Settings > Reading, none of the styles and options related to the blog archive page will be applied to that page. In order to have a customized blog page, please only use the blog shortcode in a page and consider it as your blog page.
From Visual Composer screen, click + button.

blog shortcode

In Add Element pop-up screen, search for Blog and click on it to be added to the page.

blog shortcode

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

blog shortcode

Click Save Changes and publish or update the page to check the result. It shows all the available blog posts.

Configuring Image Dimensions

There are 2 settings in Blog settings pop-up to configure the image dimensions.

Setting Description
Image heightSets a custom image height (only available when using ‘Resize & Crop’ option from above).
Image croppingIf you have this option enabled the image will be cropped based on the image height option above and the width we dynamically calculate for the layout and column you choose. if you want to show the full size featured image disable this option.

Blog Loop Content

There are 2 settings in Blog settings pop-up to configure the content shown in the blog loop.

Setting Description
Content Type (Classic Style Only)
Toggles between showing the excerpt or full content but please note it will work for the Classic Style only.
Post excerpt lengthSets the custom lenght of excerpt shown in blog loop.

Showing Specific Posts

There are 3 settings in Blog Settings pop-up which allow you to show the posts based on specific categories, IDs or authors. Type the name of category, post or author to add them in the fields.

Setting Description
Select Specific CategoriesDetermines categories of blog posts. Posts from the selected categories will be only displayed.
Select Specific PostsDetermines specific blog posts. The selected posts will be only displayed.

Note: To learn more about these settings, read Configuring specific posts in a shortcode article.

Configuring Pagination

In Blog settings pop-up, there are two settings for pagination.

Setting Description
Show Pagination?Enables or disables the pagination.
Pagination StyleDefines the pagination style. There are 2 available styles : Classic Pagination Navigation, Load more button

Altering the Posts Sorting

There are 2 settings in Blog Settings pop-up which allow you to alter the posts sorting. By default, Order and Orderby settings are set to Ascending and Date therefore it sorts the older posts ahead of newer posts.

Setting Description
Display a Sortable Filter to sort the Post by the Category.
Sets the ascending or descending order of the Orderby parameter.
OrderbySorts the posts based on the selected parameter (date, menu order, title, …).

Note: To learn more about these settings, read Configuring shortcode’s sorting settings article.

Removing Meta Section

Setting Description
Post MetaIf you dont want to show post meta (author and categories) disable this option

Configuring the Layout

There are 9 types of layouts for the blog shortcode: Classic, Modern, Mansory, Tile, Magazine, Thumbnail, List, Scroller and Slideshow.

You can check out all the blog layouts on the Ken main demo website, by going to Blog section.

Note: To learn how to configure and display blog posts using these layouts, read Displaying blog posts aricle.