Skip Navigation

[Resolved] [wpv-if field not working in search from

This support ticket is created 8 years, 4 months ago. 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.

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)

Tagged: 

This topic contains 14 replies, has 2 voices.

Last updated by Fred 8 years, 4 months ago.

Assisted by: Beda.

Author
Posts
#346300

I am trying to:
get the price filed to show in sidebar search box
I visited this URL:
hidden link
I expected to see:
you will find a empty space under designer filed
Instead, I got:
the filed is gone but use to work before

#346301

my single view
[wpv-control field="price" url_param="price" auto_fill_default="Max Price" type="select" values=",1000,2000,3000,4000,5000,1000000" display_values="Price,Less than 1000, < 2000, < 3000, < 4000, < 5000,No Price Limit"]

filter
Price is a number lower than or equal URL_PARAM(price)

#346485

Thank you for contacting us here in the Support Forum

I checked the source code of the sidebar and strangely it isn't showing the mentioned Search Filter.
It's as it would not be included in your Parametric Search Filter Editor.

Could you quickly try, to remove the Code for that specific filter from the editor and also delete it from the Query Filter section.

Then re-save your View, and re-add the Filter.

Does it solve the issue?

If not, I think I would need to request temporary access (WP-Admin and FTP) to your site
- preferably to a test site where the problem has been replicated if possible -
in order to be of better help and check if some configurations might need to be changed

Your next answer will be private which means only you and I have access to it.

❌ Please backup your database and website ❌

Please can you mention the URL of the specific View so I can quickly locate it on your end?

Please don't hesitate to inform me in case the issue persists

Thank you for your patience.

#346773

Thanks for the Details

It would be good that you first update your Toolset to it's latest version. Can you do this please?

❌ Be sure to backup your database first before you proceed! ❌
⌥ You can use a plugin for this if you like.
I often use the Duplicator plugin for this purpose.
See: http://wordpress.org/plugins/duplicator/

The Problem in that filter is the HTML tag "<"

If you remove it the filter is displayed.

What you should do instead, to render the HTML correctly, is use this list to produce valid HTML operators:
hidden link

As example I added one value with "&/l/t/; 1000"
(Please apologize the "/" slashes, I need to add them to NOT parse a "<" here :))

This produces correctly "< 1000" on the front end.

Please let me know if you need further infos about this.
Please do not hesitate to open a new thread if other issues or problems arise

Thank you for your patience.

#346944

so you mean to use
[wpv-control field="price" url_param="price" auto_fill_default="Max Price" type="select" values=", <1000, <2000, <3000, <4000, <5000, <1000000" display_values="Price,Less than 1000, 2000, 3000, 4000, 5000,No Price Limit"]

#346947
List.png

As I elaborated, you will need to use this list to find and replace your "<" sign with the proper Character entity.
hidden link

WordPress does since the last Security Update not allow anymore to have a "<" sign in a ShortCode.

Instead, you need to pass a Character entity and this will render the proper "<" sign on your front end, just as I implemented it on your end for one option of the filter.

I can not paste here the exact Character Entity because WordPress will transform it to a "<" and you will not see what you need to use.

Therefore I attached a screenshot highlighting the proper Character Entity to use and replace all "<" in that Filter.

Thank you

#346953

sorry yes i did this "&/l/t/; 1000" without "/" instead of "< 1000"
do you still have the credentials?

#347242

Hi Beda,

did you had time to look at it?

#347373

I apologize the delay here

I can not login anymore:

ERROR: The password you entered for the username adriano is incorrect. Lost your password?

Anyway, have you edited all your "<" signs to the correct entity suggested?

This worked fine in my example I provided you and left as such on the site.

I see on your site you have no values in the Price Filter.

Please enter the Filter with the Wizard and use instead of "<" the correct entity.

Please don't hesitate to inform me in case the issue persists

Thank you for your patience.

#348914

I haven t change the password since i sent it to you
to what email should i sent the new one?

#349001

I enabled the next reply as private again.

Please can you elaborate what the issue is?

The correct HMTL syntax provided by me here, does work properly, I just tested it again.
Have you applied it?
https://toolset.com/forums/topic/wpv-if-field-not-working-in-search-from/#post-346947

Please could you confirm me the additional Infos?

Thank you for your patience.

#349685

Thanks for the Details

That was my bad.
Views is providing you the comparison option already, no need to add a "<" sign.

You can just tell Views to compare "<" instead of "=" in the Wizard where you edit the Filter.

I have done that for you on the site, it's working now.

You will also want to update your Theme to the latest version.

Please let me know if you need further infos about this.

Thank you for your patience.

#349840

thanks a lot for doing it
and yes will update theme soon

that search box still need fixing, if you look at the other options they are all broken since last update

if you look at those fields
hidden link
they are not showing anymore
hidden link

it is the same blue box on homepage

#349983

Well, i see now there are different issues on that View.

You have removed mandatory prats of the View Loop as example.

If you try to edit the Loop, you will see it won't save.
There are mandatory parts in a View Loop:

[wpv-layout-start]
    [wpv-items-found]
    <!-- wpv-loop-start -->
    <wpv-loop>
    </wpv-loop>
    <!-- wpv-loop-end -->
    [/wpv-items-found]
[wpv-layout-end]

You are missing:

[wpv-layout-start]
[wpv-items-found]
[/wpv-items-found]

I tried to insert the View (Filter and Results) here:
yoursite.com/toolset-test/

The View is not displaying the Parametric Search there.
That's because you have hidden the Filter in the View, not sure why.
You can insert the View in a mode that will display only the Filter OR the results, it is not required to load both and hide the Filer with HTML.

Also when I change the Parametric Settings to show all options, it displays all options the DropDowns.

If you decide to hide/disable options if not available, you would need to leave a default Empty value for all filters.

Then, once you choose one filter, the others will update to the available options.

Currently I set it the way that they will display always.

After you adjust the View Loop, it should be working now.

Please don't hesitate to inform me in case the issue persists

Thank you for your patience.

#350662

I think it s all good
thanks for great support
i haven t follow up much the latest updates of the plugins
great work to the team!
thanks again for focusing on me that much

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.