I had the chance to try the Filter Next Query short code as you suggested, but for some reason it doesnât show the search results form nor any loop results when I add the short code above the loop as seen below.
I reached out to the developer and he communicated the following text in italic to me:
In our form the display results method would need to be set to Custom (as you should already have done), and then you need a way to add a wp_query argument to their argument. This would be that argument (they will understand this):âsearch_filter_idâ => 25802,
I suppose this would make more sense to you. Would you like to have access to an environment where we can try to figure out an integration for L&L and S&F Pro? If so, I am willing to hook you up with that on my end. Just let me know.
Could you try with just <Loop>, without specifying type? That should get the âdefault queryâ which their shortcode is meant to set.
<Loop>
<Field title />
</Loop>
If that doesnât work, Iâll look into providing a way to set any arbitrary wp_query argument, including search_filter_id. That would be a nice general-purpose solution.
Hi Gabriel - Youâre right, FacetWP integration looks like it works the same way. I see the example uses <Loop> to get the default query modified by an external plugin.
In implementing your last solution, I notice that only the title of the page is displayed and not the list of blog posts specified in the general settings.
Image showing embedded page results - Embedded on the About page for testing
Image showing S&F general settings applied - In this case, only blog post selected
Not sure what the final solution will look like, but I am wondering: Without specifying the type or other query arguments within the loop code, do you think the solution will allow us to create filters that might be dependent on a pro addon, for example LearnDash? Letâs say I want to filter courses based on the access_type or completion_status? Or is that out of the scope?
@Tangibleinc I had a look at the FacetWP, but I wasnât sure exactly which parts might need the tweaking for S&F pro.
Iâm looking forward to seeing what we can come up with
Just circling back on this. By any chance were you able to have a re-look at this? Do you envision this as something a bit difficult to achieve with S&FPâs current setup?
Hey Kendell, itâs been a while since this request but I wanted to follow up here to let you know that itâs now possible to define custom query parameters using the (intuitively named) custom_query parameter. I used your Search and Filter example from this thread in my write-up about the update so you can check out that post here. Let me know if you have any questions about this!
I created an ID (main-cards) above all the html in the block for the âscroll window to:â feature in the plugin. I then used the class âtangible-paginator-targetâ for their âAjax Containerâ. The results load fine with the Ajax turned on.
However the issue is with the pagination. I used the class âtangible-paginator-buttonâ as the âPagination Selectorâ in an attempt to have the pagination work with the Ajax loading, but it doesnât seem to work. I got this class from the tangible pagination buttons.
So my final finding with the pagination setup is that the first page of posts will load just fine. But upon performing a search and filter, the posts changes but the tangible pagination buttons remains the same. As a result, clicking on any of the numbered buttons will show posts outside of the user search and filtering.
Thatâs the only issue there. I hope I was clear enough.
Interesting. If youâre working with L&Lâs pagination, I assume this behaviour occurs because L&Lâs pagination is built when the query initially runs, so when you first load the page, thatâs when L&L decides which content should be on each page. If you then try modifying the query after the page has loaded, L&L has already decided what content should be displayed on the other pages so even if you try filtering the results using S&F, the results have already been queried and assigned to pages so the displayed results donât change. This is beyond my current skill level but I know that L&L uses ajax to build its pagination, so I assume that when you double-stack ajax like youâre doing, things get messy. Iâm also pretty sure that the âtangible-paginator-buttonâ class is created when you add L&L pagination to a loop. In your screenshot, it looks like youâre using S&F to add pagination, so those classes probably donât exist anywhere in the L&L template.
Sorry if Iâm misreading the issue, maybe someone with more development experience can chime in here to suggest why this might be occurring.