Forums › Forums › Search & Filter Pro › Search in one category only
Tagged: Avada, one category
- This topic has 26 replies, 3 voices, and was last updated 9 years, 2 months ago by
Trevor.
-
Anonymous(Private) April 12, 2016 at 6:31 pm #42512
I need to have a search form in a page that is able to search in one category only. I managed to do this with the information Ross gave me on this thread.
However, as I needed to display the search results using Post Type Archive and I already had a form that displayed results this way on my homepage, I had to find another way to do this. That’s when I found this other thread with what seemed like a way for me to work this out, this is why I asked how I could know the CPT url, so I could see if it worked.
Once I found the CPT URL and added it to the settings in the search form, I saw that once I did the filtering (inside the page with the form to search in one category only) the results wouldn’t display as I wanted, because it wasn’t filtering the results according to the taxonomies I set in the form, E.g. In the page Summer Camps, I’d expect only to find summer camp programmes in Canada if I filtered them this way, but when I select “Canada” in the form, as results I get all programmes in Canada, not the Summer Camps only.
So basically it’s still the same issue, I haven’t been able to search in just one category unless I display results in Archive (which is not the best way to do so as it looks like a blog).
Anonymous(Private) April 13, 2016 at 12:32 am #42556Hello Trevor!
Thanks for helping me earlier. I did what you told me (copying the results.php page to /themes/Avada/search-filter) but I’m getting this error: Error: The custom template file
results.php
cannot be found – go to Display Results tab to fixI also tried placing it in the child theme but I’m still getting the same error.
I’m not very good with php so I’m having a bit of a hard time customizing the results.php file, so I was wondering if you have an example of how a results page looks customized (code & visual) because I’m only good at HTML and CSS hehe 🙂
Thank you!
Trevor(Private) April 13, 2016 at 2:40 pm #42637Hi Harumi
Ross is going to have to code something special for you, so he will take over this thread. Can you make a Private reply and give him admin logins and ftp details so that he can access the files so he can do the coding to resolve this matter with your Avada Theme using the secial Portfolio CPT?
Ross Moderator(Private) April 20, 2016 at 2:10 pm #43356Hey Harumi
Sorry for the delay here..
Ok so I’ve looked, and read the thread a few times, but am getting confused by what you are trying to achieve.
Can we start, with an example of 1 search page, setup the correct way, and then explain your problem again integrating a second search form with this?
Lets focus on one search form only – I see you have a lot there which is throwing me off.
Thanks
Anonymous(Private) April 21, 2016 at 5:37 pm #43573Hello Ross,
I needed a form to display results using Post Type Archive but I can’t have two forms (or more) that displays results like this, so I had to use Archive (which in my theme looks like a blog and it’s not useful for me).
So I spoke to Trevor about it and we had a skype videocall in which we found out that Avada wouldn’t let me use a custom results.php page.
The reason I need a custom results.php is because of the way search results are displayed in my website.
This is the form that displays results using Post Type Archive: http://www.edulynks.com/prueba
I use this form to search the availability of schools depending of the type of program (academic years, summer camps, etc) and country (USA, UK, France, etc).This is the form that filters results within a type of program using Archive: http://www.edulynks.com/campamentos-de-verano
I use this form to filter schools within a type of program, for example, if the program is summer camps, I want to filter those summer camps depending of the country (summer camps in canada, summer camps in france, etc).Originally what I wanted to do is use the Post Type URL to display results like Post Type Archive like I read here but I found out that it wouldn’t work because of Avada, so Trevor suggested that I use a custom Archive page (results.php). I placed my custom results.php in the /themes/Avada/search-filter directory but it’s giving me an error: “Error: The custom template file results.php cannot be found”.
Please tell me if I explained myself clearly or if you need extra information 😀
Thank you!
-
AuthorPosts