The post shortcode can be used to display a secondary loop of posts anywhere using WP_Query.

[posts] shortcode arguments
classes:
Type -
[items|grid|cards]
Items -
[compact|very compact|divided|relaxed|very relaxed]
Grid -
[divided|celled|internally celled|relaxed|very relaxed]
Cards -
[raised|stackable|doubling|centered|fluid|red|green|blue|...]
query:
WordPress query string.
template:
Custom template name.
excerpt:
Custom excerpt length (number of words). Set to 0 to disable excerpts.
thumbnail:
Custom thumbnail image size (none|thumbnail|small|large|full).
meta:
Set to false to disable meta (date and author).
tags:
Set to false to disable tags (categories, tags and sticky post indicator).
pagination:
Set to true to enable pagination.
pagination_alignment:
Pagination alignment (left|center|right).
pagination_menu:
Additional classes for the pagination menu.
next:
Pagination next posts link text (default: "Older posts").
prev:
Pagination previous posts link text (default: "Newer posts").
Items
<posts items query="posts_per_page=3&ignore_sticky_posts=1">
Divided items
<posts divided items query="posts_per_page=3&ignore_sticky_posts=1">
Relaxed items
<posts very relaxed items query="posts_per_page=3&ignore_sticky_posts=1">
Grid
<posts grid query="posts_per_page=3&ignore_sticky_posts=1">
Divided grid
<posts divided two column grid query="posts_per_page=4&ignore_sticky_posts=1">
Celled grid
<posts celled two column grid query="posts_per_page=6&ignore_sticky_posts=1">
Internally celled grid
Google Accelerated Mobile Pages logo

Setting up AMP

Google’s Accelerated Mobile Pages project allows mobile users to access content almost instantly. Instead of displaying your real website Google links to the AMP version of your website. An AMP version is a very lightweight and mobile-oriented version of your site’s content. A lot of the resources, such as scripts, used on AMP websites can…

<posts internally celled two column grid query="posts_per_page=6&ignore_sticky_posts=1&meta_key=_thumbnail_id">
Cards
<posts cards query="posts_per_page=3&ignore_sticky_posts=1&meta_key=_thumbnail_id">
Cards count
<posts four stackable cards query="posts_per_page=4&ignore_sticky_posts=1">
Basic pagination
<posts divided items query="posts_per_page=3&ignore_sticky_posts=1" pagination="true">
Advanced pagination
<posts two column grid 
	query="posts_per_page=4" 
	pagination="true" 
	next="Older entries" 
	prev="Newer entries" 
	pagination_alignment="right"
	pagination_menu="tiny secondary"
>
Content instead of excerpt

Chap 1.14.0 – WooCommerce 3.2

Better accessibility support for popups in main menu.
Fixed conflict with main slider styles being applied to sliders created with shortcodes.
Template functions are now pluggable, meaning they can be overriden in Child theme’s functions.php file without needing to fork the entire library file.
Fixed bug where in some instances blog page was considered as front page by default. Blog page will only be home page when Reading Settings -> Front page displays is set to Your latest posts.
Masthead title on front page blog now uses alignment chosen in masthead options.
Accelerated Mobile Pages support
Featured images are no longer slightly wider than the main content on larger screens.
Search results page with no results is no rendered properly.
Added detection for blog page that is not on front page.
Fixed a bug where loops that contained a post with AMP disabled redirected the loop page to main website as well.
Added JSON-LD schema to search results page.
Buttons are slightly smaller to match the size of main website buttons.
Display headers are slightly smaller, to match the size of display headers on main website at mobile resolution.
Fixed styling of segments containing amp-carousel (galleries).
Chap Shortcodes 1.7.2
Changes to AMP styles listed above.
WooCommerce 3.2
Updated support to WooCommerce 3.2.0.
Changed templates:
cart/cart-shipping.php
cart/mini-cart.php
cart/shipping-calculator.php
checkout/thankyou.php
global/quantity-input.php
myaccount/downloads.php
myaccount/form-login.php
myaccount/orders.php
order/form-tracking.php
order/order-details-customer.php
order/order-details.php
order/order-downloads.php
New
single-product-reviews.php
Fixed shipping calculator to render correct dropdowns after AJAX updates.
WooCommerce template functions are now pluggable.
<posts one column vertically divided grid 
	query="posts_per_page=1&ignore_sticky_posts=1" 
	template="templates/loop-content" 
	pagination="true"
	next="Older post" 
	prev="Newer post" 
>
Notes
The loop-content template is designed to show posts with content inside grid loops.
No thumbnails
<posts three column grid query="posts_per_page=3&ignore_sticky_posts=1&meta_key=_thumbnail_id" excerpt="20" thumbnail="none">
No meta
<posts three column grid query="posts_per_page=3&ignore_sticky_posts=1&meta_key=_thumbnail_id" excerpt="20" meta="false">
No tags
<posts three column grid query="posts_per_page=3&ignore_sticky_posts=1&meta_key=_thumbnail_id" excerpt="20" tags="false">

Leave a comment

Your email address will not be published. Required fields are marked *