Skip Navigation

[Fermé] Parametric Search Not Filtering Results

This support ticket is created Il y a 8 années et 4 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Marqué : 

This topic contains 1 réponse, has 2 voix.

Last updated by Beda Il y a 8 années et 4 mois.

Assisted by: Beda.

Auteur
Publications
#317851
ArchiveFrontEnd.png
ArchiveLoopOutput.png
ParametricSearchLoopOutput.png
ParametricSearchSettings.png

I have a CPT set up, and I am trying to get a parametric search based on music genre on the archive page. The genre is set in a custom field in the CPT.

There are two problems:

First problem:
Currently I have 4 "test" CPTs, each with a different genre. On the archive page, only 3 of the 4 show up for some reason. It seems like only the last post is not being displayed. If I add another post, the 4th will show but not the 5th. I don't see any offset settings, so I'm not sure how to get that last post to show up.

Second problem:
When using the drop down menu to filter results by genre, nothing happens. I can change the selection in the menu, but the results on the page stay the same.

Genres are assigned to the posts as follows:
- Test: Drum and Bass
- Test2: Bass
- Test3: Techno
- Test4: House

I've included screenshots of the Parametric Search Settings, and Parametric Search Loop Output settings (same admin screen, split in two screenshots), as well as the Archive Loop Output where the search view is included, and a screenshot of the front end.

#318020

Thank you for contacting us here in the Support Forum and for providing the Debug Informations

If you want to set your Archives up this way (using a View with a Parametric Search, and display only the results of that search instead of all Archive's Content), you should disable the option "Don't include current page in query result" in the Query Options of the View with your Parametric Search.

In the Archive View you can then include the Parametric Search View.

It should display all results of the Parametric Search View at first, and after you filter it, of course only the filtered results.

Here is a example:

1. View with parametric Search:
Parametric Search:

[wpml-string context="wpv-views"]Categories:[/wpml-string] [wpv-control taxonomy="category" url_param="wpv-category" type="select"]

Loop:

<!-- wpv-loop-start -->
    <wpv-loop>
          [wpv-post-link]
    </wpv-loop>
<!-- wpv-loop-end -->

2. View "Archive View" (in my case for Home/Blog, because I queried Posts)

[wpv-form-view name="Display" target_id="self"]// I separate the View Search and results, that's optional
[wpv-view name="Display" view_display="layout"]//see above
[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
		<wpv-loop>

		</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No posts found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

Remember to uncheck the "Don't include current page in query result" in your Parametric View.

I also have chose to update Results with AJAX each time the Parametric Search values change.

If you don't use AJAX, you shall include a "submit Button" in your Parametric Search.

Please let me know if you have further questions regarding the issue mentioned in this Thread

Thank you

Le sujet ‘[Fermé] Parametric Search Not Filtering Results’ est fermé à de nouvelles réponses.