Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Overriding default search and default result spage
This topic contains 12 replies, has 2 voices, and was last updated by Ernest Marcinko 7 years, 11 months ago.
- AuthorPosts
- November 12, 2015 at 4:21 pm #6614
Hi
we’ve purchased this item because, talking with your support staff, they said to me that there was actually a way to override the default search box and, over all, the default results page. They told me that in the results page i would have had all the pages and posts and also the products (but with a different layout).“..The pro version can do a bit more, but it’s limited as well. It basically can override the default results page, so pages, posts, products are also displayed – but it cannot override the layout. So it’s still uses the the theme default search page, but different results. The products can be displayed there, but they will look different as on the WooCommerce search page…” ->your answer
I’ve found this option “Override the default WordPress search results page?”, but nothing changed.
Can you help me, please, doing these two things?
The url i gave to you is the one of my test site, and you can see your plugin used in the sidebar under SHOP ONLINE.
Thank you for supportingMarta
-
This topic was modified 8 years ago by
marta.
November 12, 2015 at 5:02 pm #6616Hi!
Unfortunately it’s not possible to just override the default search box layout, and I never said that. The reason is, that each theme uses it’s own form with an own function (in most cases), so there is no universal way of just replacing it without touching the code.
The only way of replacing the default theme search box is to replace it in the corresponding theme file (usually header.php, depends on theme author). If you want, I can help you with that. If you can also provide temporary FTP details, I can check the theme and try to replace the search in the header with the ajax search pro. (I guess that’s what you want?)
I’ve checked the search configuration regarding the override. I’ve tried a few options, but it seems like the theme is also overriding the results, as the default search results page looks unusual to me – the theme results page is separated to 3 parts, and I’m guessing it uses 3 different search queries to get those items. The problem with that solution is, that it’s impossible to override it.
Best,
I can take a look at that file as well if you want to, maybe I can restore the default search engine, which would allow ajax search pro to override the results.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 12, 2015 at 5:27 pm #6618Just added the details for ftp.
If you could take a look, it’d be a great help for me.
I don’t think i’ll have problems in editing the header.php, just thought there was an option in the plugin’s dashboard that i didn’t see.
The big issue is the result page. I need a page displaying every item of the search (posts, pages and products).
I’m sorry, i don’t find the email you sent to me, but i’ve found a short log that i’ve forwarded to my chief after our conversation“Hi!
Thanks for the kind words!
The lite version can only redirect to the default search result page.
The pro version can do a bit more, but it’s limited as well. It basically can override the default results page, so pages, posts, products are also displayed – but it cannot override the layout. So it’s still uses the the theme default search page, but different results. The products can be displayed there, but they will look different as on the WooCommerce search page.
WooCommerce has it’s internal search with a different template, but neither the free or the pro version can override the results there. There is an option in the pro version to change the redirection URL, so I usually suggest to change that to point to the woocommerce search results page. (if the user prefers to display products rather than posts)
Best regards,
Ernest Marcinko”Sorry for bothering, but having a complete results page is what prompted us to buy this plugin.
Any help will be very welcome!
Regards
MartaNovember 16, 2015 at 4:09 pm #6645Hi!
Sorry for the late response, I had an emergency update work on due to an upcoming chrome update.
I’ve tried to connect with the given details, but I’m getting the following error:
[SFTP] Connection failed : Failed to resolve hostname serverb.****.it (This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. )
Unable to connect
I’m guessing either the host name or the port is incorrect? Or maybe I have to add something to my local hosts file?
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 16, 2015 at 5:32 pm #6646Hi! We just rechecked the datas, and they’re all correct, you don’t need to add anything to your local hosts files.
Don’t know why.
I saw that you’re using the sftp.. I don’t have any ideas..November 17, 2015 at 9:56 am #6648Hi!
I’ve managed to get in. My configuration was correct all along, I had to reset my router and modem, I have no idea why. Seems like my ISP is doing strange stuff.
The good news is, that I’ve found why the theme is not displaying any results. After some reverse engineering I’ve found that the inlcudes/loop.php file is handling out the results in the theme directory. It basically separated them into 3 groups, but it wasn’t working correctly for some reason.
I didn’t want to change that file, and I noticed that you are using a child theme, so I’ve made a search.php file in the child theme directory. WordPress automatically looks for this file, and if it exists, then it’s automatically considered as the search results handler. I’ve copied over the original index.php content and the corresponding part of the includes/loop.php file, and I made a correction not to filter anything. Now this search.php file is entirely handling the results content.
I did not change any of the code, only the search.php file was created, so this should be update-proof as well.
I did a few tests, and it looks like it’s working correctly, and handling the results as expected 🙂
If you want to change layout of the search page, or anything regarding it, you can do it by editing the organic_shop-child/search.php file.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 24, 2015 at 9:57 am #6724Hi, sorry for answering you so late, but i’ve been sick in these days…
Thank you for your work.
I’m seeing that your corrections work fine in the default search method, but it is not displaying your plugin 🙁When I use your plugin (Shop online->sidebar) and click on the magnifier icon it works properly, but clicking on “more results” (search.png) it returns me a strange thing. I’m my url the domain is double (url.png) and trying to delete the second domain it returns me a results page with everything on my site…(results.png)
i’m adding you some screenshot.
best
Marta
Attachments:
You must be logged in to view attached files.November 24, 2015 at 11:01 am #6732Hi!
The more results problem was a simple misconfiguration. On the Layout Options -> Results Laoyut panel the ‘ Show more results..’ url option was set incorrectly, so I changed it to the default. It should display the correct ones now.
As for the search, I’m guessing you are talking about this one? https://i.imgur.com/kSPOkaV.png
Best,
In this case, the wrong widget is selected on the widgets area: https://i.imgur.com/qcCzcka.png
If you replace that with ajax search pro, then on every page where this widget area is active the ajax search pro should be visible.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
December 10, 2015 at 12:15 pm #7000Sorry for the late answer, but i’ve been sick and then a lot of work..
Thank you for your help, now all works fine, except for the main search in the navbar, that is actually showing the exact results page, but the layout is not the one i set up for the plugin. I’ve tried to add the shortcode to my header.php but the search field is floating down above the navbar when i type my words and opens a white list of results.
Any suggestion?-
This reply was modified 8 years ago by
marta.
December 28, 2015 at 11:40 am #7159Hi, sorry for bothering you again, but i did not receive any answer
December 29, 2015 at 2:12 pm #7180Hi!
Sorry for the late response, I was on a family vacation.
I see you managed to put the search shortcode to the header.php file. It was almost correct, I had to remove the surrounding form element, it was causing problems.
Also after fixing that, I’ve added the following custom CSS to reduce the width a fix the floating and margins for the home page search:
/* Front page ajax search pro fixes */ #main-menu-wrapper .asp_main_container { width: 200px !important; height: auto !important; margin-top: 12px !important; }
That reduces the width for the search to a correct 200px to fit into that space, but only for the header search instance.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
December 30, 2015 at 3:09 pm #7198I’m really grateful for your great support!
Everything’s ok now!Thank you again and a very happy new year to you and your family 🙂 !!
Marta
December 30, 2015 at 3:55 pm #7199It was my pleasure helping you, and I wish you a happy new year too! 🙂
If you like the plugin, feel free to leave a rating on it on your codecanyon downloads page, it’s greatly appreciated.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
-
This topic was modified 8 years ago by
- AuthorPosts
You must be logged in to reply to this topic.