Posts Grid

Posts Grid is a Shortcodes Ultimate Pro shortcode for displaying WordPress posts in a responsive grid or list. It lets you filter posts by post type, taxonomy, terms, authors, keyword, and post IDs, and provides controls for the post card layout: featured image, title, meta fields, excerpt, read more link, and pagination.

Features Overview

Parameters

AttributeGenerator tabDescriptionValues / formatDefault
post_typeQueryFilters posts by post type.Registered post type slug. Comma-separated values are accepted by the runtime.post
taxonomyQueryLimits results to posts associated with a taxonomy.Registered taxonomy slug, or any to disable taxonomy filtering.any
termsQuerySelects taxonomy terms used by the taxonomy filter.Term IDs or slugs, comma-separated. Used only when taxonomy is set.Empty
operatorQueryControls how selected taxonomy terms are matched.IN, NOT IN, ANDIN
includeQueryIncludes only selected posts.Post IDs, comma-separated.Empty
excludeQueryExcludes selected posts.Post IDs, comma-separated.Empty
authorQueryLimits results to selected authors.User IDs, comma-separated.Empty
keywordQueryFilters posts by a search keyword.Plain text search string.Empty
posts_per_pageQuerySets the number of posts shown per page.Integer from -1 to 10000; -1 shows all posts. Invalid values fall back to 6.6
pagedQuery, hiddenSets the initial page number. Deep-link pagination can override it from the URL.Integer from 1 to 10000.1
orderbyQuerySorts retrieved posts by a WordPress query field.none, id, author, title, name, date, modified, parent, rand, comment_count, menu_order, meta_value, meta_value_num, post__indate
orderQuerySets ascending or descending sort order.DESC, ASCDESC
ignore_stickyQueryIgnores sticky posts when set to yes.Booleanyes
layoutLayoutSelects the Posts Grid layout.grid, listgrid
grid_columnsLayoutSets the number of columns on desktop screens.Integer from 1 to 12. Invalid values fall back to 3.3
grid_tablet_columnsLayoutSets the number of columns on tablet screens.Integer from 1 to 12. Invalid values fall back to 2.2
grid_mobile_columnsLayoutSets the number of columns on mobile screens.Integer from 1 to 12. Invalid values fall back to 1.1
list_thumbnail_max_widthLayoutSets the maximum featured image width for list layout.Pixels, integer from 20 to 1200. Invalid values fall back to 300.300
horizontal_gapLayoutSets horizontal gap in pixels. In list layout, this controls the gap between the thumbnail and title.Pixels, integer 0 or greater.24
vertical_gapLayoutSets vertical gap in pixels. In list layout, this controls the gap between list items.Pixels, integer 0 or greater.24
skinLayout, hiddenSelects the Posts Grid skin.CSS class-safe skin slug. Currently registered value: default.default
accent_colorSingle PostSets accent color for post title links, meta links, and pagination.CSS color value accepted by su_sanitize_css_color().#0088ff
show_imageSingle PostShows the featured image.Booleanyes
image_sizeSingle PostSelects featured image size.full or any registered WordPress intermediate image size.medium_large
image_ratioSingle PostSets featured image aspect ratio.21:9, 16:9, 16:10, 5:4, 4:3, 3:2, 2:1, 1:1, 1:2, 2:3, 3:4, 4:5, 10:16, 9:16, 9:21, or a numeric ratio.16:9
image_border_radiusSingle PostSets featured image border radius.Pixels, integer 0 or greater.5
show_titleSingle PostShows the post title.Booleanyes
title_tagSingle PostSets the HTML tag used for post titles.h2, h3, h4, h5, h6h3
title_text_sizeSingle PostSets post title text size. 0 uses the default size.Pixels, integer from 0 to 120. Invalid values fall back to 0.0
show_metaSingle PostShows post meta.Booleanyes
meta_fieldsSingle PostSelects meta fields and their order.Comma-separated list. Generator values: date, category, author, comments. Runtime also renders modified.date, category
show_excerptSingle PostShows the post excerpt.Booleanyes
excerpt_lengthSingle PostSets the maximum number of words in the excerpt.Integer 0 or greater.18
show_read_moreSingle PostShows the read more link.Booleanno
read_more_textSingle PostSets read more link text.Plain text.Read more...
paginationAdvancedControls pagination mode.none, ajax-numbers, ajax-prev-next, deep-links-numbers, deep-links-prev-nextajax-numbers
open_links_in_new_tabAdvancedOpens post links in a new browser tab.Booleanno
empty_textAdvancedSets text shown when no posts are found.Plain text.No posts
classAdvancedAdds extra CSS class names to the wrapper.Space-separated CSS class names.Empty
Helpful?
🤝 Thank you!