Can I use Tags to Filter Posts?

Yes, you can. In addition to filtering posts based on their categories, it is possible to use the post shortcode to pull back pages by their associated tags. This is feature is not available through the shortcode generator, but can be added to the generated code after the post shortcode has been added.

Step 1: Generate the Post Shortcode.

Create the post shortcode using the Post Shortcode Generator button. You do not need to call a specific page or category, Just click the "ok" button. This should give you something that looks like:

[posts numberposts="4" type="type"]

Step 2: Add the tag="" attribute.

Once you have your code, you need to add the tag attribute to it. When you do, your code should look like this:

[posts numberposts="4" type="type" tag=""]

Step 3: Add the slug for the tag you want to filter by.

Every tag has a slug. Rather than using the category id or page id you need to use the tag's slug here To get a tag's slug, go to Posts > Tags and then find the tag you want to use and then look over to the 3rd column in the table. That's were you will find the slug. Take the slug and put it in your code in between the quotes in the tag attribute. Your code should look something like this:

[posts numberposts="4" type="type" tag="gsu-scholarships"]

Step 4: Preview the page.

Once you've got the code in place, preview the page. You should see only the posts that are associated with the tag you selected. If you do not see any posts, check to see if the tag you are using has any posts associated with it and then double check your code.

Feedback and Knowledge Base