Site logo

Archived topic

Making Jet Grid list and Jet Smart Filter Work with GP archive template

5 replies · Started by Praveen on August 11, 2021

Viewing posts 1–6 of 6

Checkout this pls - https://www.inves4.com/imp-information/

As of now because of the loop everything seems to be repeating.

How can I make this work?

Have also tried dynamic fields of GB but Jet Smart Filters don't work with that.

One option is to do it by setting a page but ideally would like to use the archive functionality of Wordpress as it seems that speed suffers through page route.

Kindly suggest the solution.

Hi there,

Try changing where you hook in the filter. :D

You're likely using generate_before_content. Try using generate_before_main_content so the filter is added only 1 time, outside the loop. :D

Hi Elvin,

I am not using the hook. This is the content template route applied to archive. In the template I am using Jet Listing grid and Jet Smart Filters (as they can only be used with Jet Listing Grid)

Hi there,

you don't want to add your own 'loop' inside a content template, as its name suggests its a template for the content, which is output inside the themes loop.

If you want to replace the loop, you can either create your own archive template.

Or this topic here the user provides a function, to disable the default loop, and hook in after the loop:

https://generatepress.com/forums/topic/google-site-searchcustom-search-implementation/page/2/#post-1656373

Its for a search template, but the logic applies for any template.

Thanks for your reply David.

The solution provided by you makes complete sense. I will do the needful.

It's so important to understand Wordpress structure :)

Regards

Glad to be of help

This archived topic is closed to new replies.