Skip to content
  • Home
  • PluginsExpand
    • WP Recipe Maker
    • WP Ultimate Post Grid
    • Easy Affiliate Links
    • Easy Image Collage
    • All-Access Pass
  • FAQ & Support
  • About Us
  • Blog
  • Your Account
Bootstrapped Ventures Knowledge Base
  • Get the Plugin
  • DocumentationExpand
    • WP Recipe Maker
    • WP Ultimate Post Grid
    • Easy Affiliate Links
    • Visual Link Preview
    • Custom Related Posts
  • Open a Support Ticket
Bootstrapped Ventures Knowledge Base

Getting Started

6
  • Installing WP Ultimate Post Grid
  • Activating your license key
  • Updating WP Ultimate Post Grid
  • Creating a Grid
  • Adding a Grid to your Website
  • Grid Template Editor

Creating a Grid

1
  • Creating a Grid
  • Grid Edit Screen
    • General
    • Data Source
    • Limit Items
    • Filters
    • Layout
    • Item
    • Pagination
    • Other
  • Grid Filters
    • Isotope Filter
    • Dropdown Filter
    • Checkboxes Filter
    • Text Search Filter
    • Clear All Filter Selections Button
    • Custom HTML
    • Dynamic Order
    • Responsive Filter Display
  • Grid Pagination
    • Divide posts in Pages
    • Use a “Load More” button
    • Infinite Scroll Load
    • Load more posts on filter

Template Editor

4
  • Grid Template Editor
  • Classes you can use in the grid template editor
  • Using conditions in the grid template
  • Using ACF or other Custom Fields

Advanced Features

8
  • Cloning a Grid
  • Limit Items Dynamically
  • Custom filter term order
  • Default Filter Selections
  • Custom Field Filters
  • Using WP Extended Search to alter the Text Search filter
  • Set Custom Links and Images
  • How to Center the Grid

WPUPG for Developers

3
  • Accessing or manipulating a grid in the front-end
  • Custom filter term order
  • Use a grid for the search or archive page

Announcements

3
  • WP Ultimate Post Grid Changelog
  • WP Ultimate Post Grid 3.0.0
  • WP Ultimate Post Grid Legacy

Debugging Plugin Issues

3
  • Debugging plugin problems
  • The downloaded plugin is not a zip archive
  • Creating a Temporary Login
View Categories
  • Home
  • Documentation
  • WP Ultimate Post Grid
  • Advanced Features

Limit Items Dynamically

This feature is available in WP Ultimate Post Grid Premium

For some advanced use cases you might want to limit a grid dynamically based on certain variables.

Fields you can limit by

Limiting by Taxonomy Terms

An example use case would be the inclusion of a grid on the taxonomy.php page and filtering that grid by that specific term.

In the Premium version this is possible by adding parameters to the grid or grid-with-filters shortcode:

[wpupg-grid-with-filters id="my-grid" post_tag="1;3"]

This shortcode would use “my-grid” as it is and dynamically filter it before displaying, limiting it to only posts that are tagged with term id 1 or 3. You can look up those term IDs in the URL of the term edit page.

Instead of “post_tag” you can use any other taxonomy (like “category” or any custom taxonomy).

Limiting by Post ID

It is also possible to dynamically filter posts by post ID:

[wpupg-grid-with-filters id="my-grid" post_id="28;88"]

Or even exclude certain posts by ID:

[wpupg-grid-with-filters id=”my-grid” exclude_post_id="9"]

Instead of an actual post ID you can also use “current_post” to represent the post ID of the page that is displaying the grid. For example:

[wpupg-grid-with-filters id="my-grid" exclude_post_id="current_post"]

Limiting by Author

Another option is to limit by a specific author:

[wpupg-grid-with-filters id="my-grid" author="3;8"]
[wpupg-grid-with-filters id="my-gr" exclude_author="3;8"]

Instead of the author ID you can also use “current_user”. This can be used to have a grid that only displays post by the currently logged in user, for example:

[wpupg-grid-with-filters id="my-grid" author="current_user"]

Dynamically limiting offset or total item limit

With the “item_limit” and “item_offset” attributes you can also dynamically change the total number of items shown in the grid, and the offset that should be used when retrieving items for that grid. This could be used to split a grid in different parts, for example.

This code would show a grid of maximum 5 items, starting at item 11:

[wpupg-grid-with-filters id="my-grid" item_limit="5" item_offset="10"]

Dynamic Filtering in the Block Editor

In the Gutenberg Block Editor you could either work with the shortcode or set those same parameters in the sidebar of the Grid or Grid with Filters Block:

Take note that you don’t add the full shortcode here, only the parameters you want to pass along.

Dynamic Filtering for Category Grids

For category grids you have similar options by using the term_id and exclude_term_id attributes. For example:

[wpupg-grid-with-filters id="my-category-grid" exclude_term_id="current_term;42"]
Updated on December 2, 2024
Cloning a GridCustom filter term order
Table of Contents
  • Fields you can limit by
    • Limiting by Taxonomy Terms
    • Limiting by Post ID
    • Limiting by Author
    • Dynamically limiting offset or total item limit
  • Dynamic Filtering in the Block Editor
  • Dynamic Filtering for Category Grids

© 2025 Bootstrapped Ventures · BE0634.767.406
Privacy Policy

  • Bootstrapped Ventures
  • Plugins
    • WP Recipe Maker
      • Demo
      • Documentation
      • Get the Plugin
    • WP Ultimate Post Grid
    • Easy Affiliate Links
    • Easy Image Collage
    • All-Access Pass
  • FAQ & Support
    • Knowledge Base
    • Documentation
  • About Us
  • Blog
  • Your Account