April 27, 2023

Custom Post Loop Filters with WP Grid Builder and Bricks Builder

Play Video

Custom Post Loop Filters are a powerful tool for WordPress users, developers, and designers. They offer a way to customize and enhance the display of posts on your WordPress site, providing a more tailored experience for your visitors. With the right tools and a bit of know-how, you can create custom filters for your post loops, adding a new level of interactivity and customization to your site. This tutorial by WPTuts will walk you through the process of creating custom post loop filters using Bricks Builder and GridBuilder WP.

Setting Up Your Workspace

  1. Install Necessary Tools
    To start, you’ll need to have Bricks Builder and WP GridBuilder installed on your WordPress site. Additionally, you’ll need to download and install the Bricks Builder add-on from the GridBuilder WP add-ons section.
  2. Create a New Page
    Once your tools are installed, create a new page on your WordPress site. This is where you’ll be building your custom post loop filters.
  3. Insert a New Section
    In Bricks Builder, insert a new section on your page. This is where you’ll place your post loop.
  4. Add Blocks for Filters
    In the new section, add two blocks. These will serve as the left and right-hand columns for your filters and post loop, respectively.
  5. Set Block Widths
    Set the width of the first block (your filters) to 25% and the second block (your post loop) to 75%.

Building Your Post Loop

  1. Insert Posts Element
    In the second block, insert the ‘Posts’ element. This will automatically pull in all of your posts.
  2. Configure Post Query
    With the ‘Posts’ element selected, go to the ‘Query’ option and set the post type to ‘Posts’.
  3. Add Additional Fields
    In the ‘Fields’ option, add new fields for the category and author of the post. You can also add a field for the post date.
  4. Save Your Work
    Once you’ve configured your post loop, save your work.

Creating Your Filters

  1. Navigate to WP GridBuilder
    In WP GridBuilder, navigate to ‘All Facets’. This is where you’ll create your filters.
  2. Create a New Facet
    Click to create a new facet. Name it ‘Post Category’ and set the facet title to the same.
  3. Configure Facet Behavior
    In the ‘Behavior’ section, set the facet action to ‘Filter’. Choose ‘Check Boxes’ as the filter type and set the data source to ‘Taxonomies’. Select ‘Categories’ from the dropdown menu.
  4. Save Your Facet
    Once you’ve configured your facet, save your changes.
  5. Insert Facet into Page
    Back in Bricks Builder, select your left-hand column and insert the ‘Facet’ element. Choose the facet you just created and set it to work with your post loop.
  6. Preview Your Work
    Save your page and preview it. You should now see your custom post loop filters in action!

Sorting Your Posts

  1. Create a New Facet
    Back in WP GridBuilder, create a new facet. Name it ‘Sort Post’ and set the facet title to the same.
  2. Configure Facet Behavior
    In the ‘Behavior’ section, set the facet action to ‘Sort’. Add two options: ‘Sort by Date – Oldest First’ and ‘Sort by Date – Newest First’. Set both to order by ‘Post Date’, with the first ascending and the second descending.
  3. Save Your Facet
    Once you’ve configured your facet, save your changes.
  4. Insert Facet into Page
    Back in Bricks Builder, insert the ‘Facet’ element above your post loop. Choose the facet you just created and set it to work with your post loop.
  5. Preview Your Work
    Save your page and preview it. You should now see your custom post loop filters and sorting options in action!

Why Custom Post Loop Filters are Beneficial

Custom Post Loop Filters offer a range of benefits for WordPress users. They allow you to create a more tailored experience for your visitors, displaying posts in a way that aligns with their interests and needs.

Enhanced User Experience

By using custom filters, you can categorize and display your posts based on specific criteria. This makes it easier for your visitors to find the content they’re interested in, enhancing their experience on your site.

Increased Site Engagement

Custom filters can also increase engagement on your site. By making it easier for visitors to find relevant content, they’re more likely to spend more time on your site, explore more content, and engage more deeply with your posts.

Improved Site Organization

Finally, custom filters can improve the organization of your site. By categorizing and filtering your posts, you can create a more structured and organized site layout, making it easier for you and your visitors to navigate your site.

Additional Tips & Tricks

  • Use Descriptive Facet Names
    When creating your facets, use descriptive names that clearly indicate what the facet does. This will make it easier for your visitors to understand how to use your filters.
  • Test Your Filters
    After setting up your filters, test them to ensure they’re working correctly. Make sure each filter correctly categorizes and displays your posts.
  • Experiment with Different Filter Types
    Don’t be afraid to experiment with different filter types. Different types of content may benefit from different types of filters.

Common Issues and Solutions for Custom Post Loop Filters

  • Filters Not Displaying Correctly
    If your filters aren’t displaying correctly, check to make sure you’ve correctly set up your facets in WP GridBuilder. Make sure you’ve selected the correct data source and filter type.
  • Posts Not Filtering Correctly
    If your posts aren’t filtering correctly, check to make sure you’ve correctly configured your post loop in Bricks Builder. Make sure you’ve set the post type to ‘Posts’ and added the necessary fields.
  • Sorting Options Not Working
    If your sorting options aren’t working, check to make sure you’ve correctly set up your sorting facet in WP GridBuilder. Make sure you’ve added the correct sorting options and set them to order by ‘Post Date’.

Required Resources

WP Grid Builder Logo
Free Options
Bricks Builder Logo
Payment required
Credit to WPTuts
WPTuts is a popular YouTube channel dedicated to providing high-quality, easy-to-follow tutorials for WordPress enthusiasts, web designers, and developers. The channel features a wide range of topics, from beginner guides on setting up your first WordPress site to advanced tutorials on customizing themes and plugins, ensuring that there's something for everyone
Visit
Custom Post Loop Filters with WP Grid Builder and Bricks Builder
Welcome back!
Enter your Helwp credentials to sign in.

No Account yet? Sign Up

My Account
Menu
Give Feedback
Describe your feedback *
Rate Helwp
Share
Facebook
Twitter
LinkedIn
Reddit
Email
WhatsApp
Telegram
Pocket
Report
Problem *
Describe the problem
Want us to reply?
Your E-Mail
Affiliate Disclosure

At Helwp, we’re committed to transparency and honesty. Therefore, we want to inform you that some of the links on our website are affiliate links. This means that, at no additional cost to you, we may earn a small commission if you click through and make a purchase.

We only promote products or services that we genuinely believe in. These affiliate commissions help us to maintain the website and continue to provide you with free, high-quality WordPress content.

If you are interested in how you can support us even further, check out our support page.