Skip Navigation

[Resolved] Creating custom search for existing View

This thread is resolved. Here is a description of the problem and solution.

Problem:
Creating custom search for existing View

Solution:
You need to change the purpose of the existing view to custom search.

You can find the proposed solution in this case with the following reply:
=> https://toolset.com/forums/topic/creating-custom-search-for-existing-view/#post-1512471

Relevant Documentation:
=> https://toolset.com/documentation/user-guides/views/front-page-filters/

This support ticket is created 4 years, 2 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 8 replies, has 2 voices.

Last updated by John Mac 4 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#1511429

# Tell us what you are trying to do?
I had already created a view to list a CPT and going through the hassle of designing this using WP blocks. Now I would like to built a custom search on this page, using manual text search + a few taxonomy choices.

But I can't find out how to make that work.

I was hoping that I could simply add in another View like this:

<wpv-loop>
[wpv-view name="contributions-list-on-redeem-page"]
</wpv-loop>

I mean, in the Loop editor you have the button to choose from existing "Fields and Views".

# Is there any documentation that you are following?
I can see in your documentation that you mention this: " If you want to add a custom search to an existing View, make sure that the Custom Search Settings and Filter Editor sections are being displayed."

https://toolset.com/documentation/user-guides/views/front-page-filters/

# Is there a similar example that we can see?
Not right now.

# What is the link to your site?
hidden link

So what would the method be here? Or do I really have to redo the whole built of that previous View. Using the WP block editor is a damn hassle and needs a lot of coding to make things look good.

John.

#1512375

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

To enable the custom search for your view, you need to click/focus on your views block and on the right sidebar, you will see the section "Use Views elements" under that section you will see the "Search" on/off button. You should activate the Search option.

Please check the following screenshot:
=> hidden link

#1512455
Screenshot 2020-02-17 at 13.18.56.png

Hm, I don't have that option on this setup. I'm in the WP block editor for the View, but I can't see that choice. I'm adding my screenshot here to show you what it looks like for me.

#1512465

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - It looks like you have added the view using Fields and Text editor.

Can you please share what view you want to convert to a custom search and send me admin access details so I can check further.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually 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.

I have set the next reply to private which means only you and I have access to it.

#1512471

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - I see you are using the normal classic view. To change the view purpose, you need to click on the "screen options" at top right side and there you will see the "View Purpose" dropdown from where you can change the view's style as per your requirement.

Please check the following screenshot:
=> hidden link

#1512503

Okay, wow, I never knew that. It's not something I can say is properly coming out in your documentation. When I go through your docs and videos, sometimes it's like its not showing everything we need to know.

I guess you made the change on that. Because it was already activated as "show display as custom search" for the View now.

I don't see any difference on in the WP blocks editor. But I do see the search filters coming up on the frontpage: hidden link

So how do I style this? I'm stuck with having to code up manual HTML and CSS for this view now?

#1512671

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I guess you made the change on that. Because it was already activated as "show display as custom search" for the View now.
==>
Yes, I changed that.

I don't see any difference on in the WP blocks editor.
==>
You will not as you created the view using the classic editor not the block editor.

So how do I style this? I'm stuck with having to code up manual HTML and CSS for this view now?
==>
As you created the view using the classic view you need to style it by adding manual HTML and CSS.

Here is the video link you should check that help you to know how you can add the filters to your block view:
=> hidden link

But the method shown in the above video will not help you because you have not created your view using Toolset blocks but using classic views.

So, you have two choice, either format your form with your current view by adding HTML and CSS as per your need or create a block view from scratch.

#1512673

Okay good to know. Thanks.

I see. So then I'm looking into hacking this up with my own code for this time. But at least I know the difference now. And at least I got the filtering to work nicely on the frontpage.

Thanks for your quick follow-up. I'll close this after my comment here 🙂

#1512679

I'll work on some coding to beautify

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