Skip Navigation

[Resolved] Showing results for ""

This support ticket is created 5 years, 3 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 2 replies, has 2 voices.

Last updated by Beda 5 years, 3 months ago.

Assisted by: Beda.

Author
Posts
#1308089

Hi there,

I accidentally lost the JS code that was provided as a solution to my recent request.

https://toolset.com/forums/topic/showing-results-for/

Can you please provide this again?

Many thanks,
Cat

#1308173

I've temporarily removed the "resultsfor" div until this works:

<div class="resultsfor">
    <h3> 
        [wpv-conditional if="( '[wpv-search-term param='wpv_post_search']' ne '' )"]
        Showing results for [wpv-search-term param='wpv_post_search']
        [/wpv-conditional]
        [wpv-conditional if="( '[wpv-search-term param='wpv-relationship-filter-support-category']' ne '' )"]
        Showing results for <div class="resultsfor-cat"></div>
        [/wpv-conditional] 
        [wpv-conditional if="( '[wpv-search-term param='wpv-relationship-filter']' ne '' )"]
        Showing results for <div class="resultsfor-subcat"></div>
        [/wpv-conditional]
    </h3>
</div>
#1308533

We cannot develop websites for the Toolset users, we can, however, help achieve the goals with Toolset.
I see that Minesh shared the code with you here:
https://toolset.com/forums/topic/showing-results-for/#post-1299587

This code was added by Minesh in a View's Search and Pagination JS Editor Section (that's just below the Search and Pagination HTML editor, where you add searches).
It was added to this View: hidden link

You can add it back if it's not there. We can however not provide fully working, or debug such Custom Code because it does not make usage of Toolset's JS API, and the Toolset Support is limited in what can be offered as custom code, please see https://toolset.com/toolset-support-policy/

Now, related to https://toolset.com/forums/topic/showing-results-for-2/#post-1308173, there you show me the HTML conditions, those are however not directly related to the JS code mentioned.
Those conditions simply listen to a URL parameter, with [wpv-search-term param='wpv_post_search'], and check on it's content. If you update the URL parameter with the JS code, then yes, they'll only work if the JS code also updates the URL parameters.

It can be added, if lost, like above explained.

Please let me know if there are any problems left after this

Thanks!