How to Insert Masonry Post with Specific Category or Categories

If you’ve inserted your masonry, tiling posts, but only want to display posts from certain categories instead of all of them, here’s how.

Insert your posts shortcode by following this.  Then, examine the shortcode options. You will need to make sure taxonomy=”category” as seen above. Then, you will need to insert your category slug under terms=”your-category-slug.”

If you don’t know the slug of your category, you can find it by going to POSTS / CATEGORIES then clicking edit on your various categories to copy the slug. That is what you will need to insert in the shortcode.

cate

You can also add multiple categories by separating your categories with commas. Example: terms="your-category-slug1,your-category-slug2"

Here is some code you can copy / paste. You can see we are calling a category called “fashion.” You will need to copy / paste the slug from your own category in its place.

[wc_posts author="" author_name="" p="" post__in="" order="DESC" orderby="date" post_status="publish" post_type="post" posts_per_page="10" taxonomy="category" field="slug" terms="fashion" title="yes" meta_all="yes" meta_author="yes" meta_date="yes" meta_comments="yes" thumbnail="yes" content="yes" paging="yes" size="large" filtering="yes" columns="2" gutter_space="10" heading_type="h2" layout="masonry"][/wc_posts]