26 Aug 2019
In this tutorial, we'll show you how to use the Builder Pro's Dynamic Query feature to customize how you present your post archives. Dynamic Query is used primarily for ensuring the archive view for your categories are shown the way you want it to. It will also automatically detect what kind of archive we are looking at and will display the appropriate posts.
You can use a variety of modules to with this feature, including the Mosaic, Slider, Timeline, and Infinite Posts modules. No more typical and old blog post archive views! Now, simply toggle ‘Dynamic Query’ on one of these modules and you can arrange and present your blog posts the way you want.
Take a look at our demos for inspirations on using each module as a post archive view.
You can watch the video below, or follow our written tutorial if that’s your cup of tea!
How to Use Dynamic Query
Before we begin, install the Builder Pro plugin – the beta version is free for a limited time, and recommended for use on a test site. (Please note: to use Builder Pro, you must either activate a Themify theme or the Themify Builder plugin).
Create a Pro Theme:
- Go to WP Admin > Themify > Pro Themes, click ‘Add New’
- Enter a Theme Name of your choice, upload the optional theme Thumbnail image, and click ‘Next’.
- You will then have the option to create a blank theme or import a premade theme. For this tutorial, let’s go ahead and import the pre-made Magazine theme:
- select the ‘Magazine’ thumbnail and click ‘Activate’.
Enabling Dynamic Query:
Now we’re going to live edit our Magazine Post Archive template:
- Go to Templates > Archive > Magazine Post Archive > Frontend
- Turn on the Builder, select and replace the existing module with one of your choice – for this tutorial, we’ll use the Mosaic module:
- Click the green (+) plus icon and add the Mosaic module
- Open the Mosaic module options, toggle Dynamic Query to enable it
- Click ‘Done’ and ‘Save’
Now when you go to any category archive view, you’ll see your new mosaic module in place of the typical post archive. You can see this in action by going to Posts > Categories > select any category
And that’s it!
Don’t forget, you can opt for more than just the Mosaic module, including the Slider, Timeline and Infinite Posts modules. You can further customize each module’s styling, including the font, colours, post titles and even have two different styles of archive posts depending on the category by using the Display Conditions feature.
Let us know below how you are finding the Builder Pro and if you need more guidance, read our Builder Pro documentation.
Video by James Welbes.