Please note, this is a STATIC archive of website www.themepunch.com from 28 Sep 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Always show “featured” posts first in your grid

home_topbanner

Modify your grids to always show featured posts first.
Useful for "sticky" posts and any other posts you wish to feature first in your grid.

  • Quick Note:
    The code snippets below can be added to your theme's "functions.php" file.

1. Specific Tag Method:

This method works by adding a specific tag to the posts you want to feature.

For this example, I’ve created a new tag called “featured”, and this is what we will check for in the PHP code.

featured_tag

Using a Custom Post Type?

Change this line:

to this:

2. Sticky Post Method:

This method will allow you to always show posts marked as “sticky” first in your grid.

On the surface this may seem like the obvious choice, but it’s important to keep in mind that setting a post as a “sticky” means it will also be shown first in your regular blog.  So if you only want to show certain posts first in your grid only, use the “tag” method above instead.

sticky_post