Always show “featured” posts first in your grid

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.

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.