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.

Exclude Individual Posts from Grid

home_topbanner

Assigning posts to an Essential Grid is fairly easy with the ability to choose between post type, categories and tags.
But if you need to exclude specific posts from the chosen source, this article will cover how this can be accomplished.

Example scenario where you might want to exclude a specific post:

  • You wish to include “Category A” and “Tag 1” as the grid’s source.
  • “Category A” may or may not contain “Tag 1”, and vice versa.
  • Posts with “Tag 1” may also contain an additional category named “Category B”.
  • You wish to exclude posts that have “Category B” assigned.

The easiest way to exclude specific posts from a grid is to use the “post__not_in” Additional Parameter.  In the following screenshot, the grid would exclude posts with the ID’s “10” and “25”

post-not-in

But if you’d rather not update the “Additional Parameters” value each time you wish to exclude a post, and instead would like to do this from within the post itself, here’s how this can be accomplished:

1. Add the following to the "Additional Parameters" section.

hidden-items

2. Create a new "Custom Meta" with the following settings.

meta-data-handle
add-new-meta-2
hidden-item-meta

3. Inside the post's "Essential Grid Custom Settings" section, assign the number "1" to your posts that you wish to exclude.

hidden-item-meta-value

Special Note:

Because the number “0” was designated as the Custom Meta’s default value (see “Custom Meta” screenshot above), this value will automatically be assigned to your other posts.  But you may need to visit these posts in your WP admin and click “Update” for the value to be officially assigned.

update-other-posts

Recap:

Essential Grid Custom Settings -> Custom Meta -> Hidden Item -> 0 = DO NOT exclude post from grid

Essential Grid Custom Settings -> Custom Meta -> Hidden Item -> 1 = EXCLUDE post from grid