Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Replace theme search
- This topic has 17 replies, 2 voices, and was last updated 8 years, 5 months ago by
zainabubu.
-
AuthorPosts
-
December 6, 2017 at 11:51 pm #15751
zainabubu
ParticipantI need to replace the search function in my theme with yours and the theme creator is not helping much with it. All the clue he’s given is to do it in \inc\template-tags.php, use function within the wowmall theme folder and there so many lines in there that I may end up breaking my site. Kindly help resolve.
December 7, 2017 at 11:39 am #15758Ernest Marcinko
KeymasterHi!
Thank you very much for the details! Unfortunately the back-end password was not working, but I may have been able to replace the search anyway in the given directory via FTP.
If you clear the site cache, it may pop up instead of the default search.
December 7, 2017 at 1:46 pm #15764zainabubu
Participantah, Tech should be the user name. The search function is not working.
December 7, 2017 at 1:58 pm #15767Ernest Marcinko
KeymasterYou cannot access this content.
December 7, 2017 at 2:04 pm #15772zainabubu
ParticipantThat’s odd, can you try it again? I just did a test login with no problems
-
This reply was modified 8 years, 6 months ago by
zainabubu.
December 7, 2017 at 2:08 pm #15773Ernest Marcinko
KeymasterI managed to log-in finally, sorry about that. My clipboard app was not cleared properly.
The reason why the plugin is not triggering the live search is, that it’s turned off. The magnifier and return button actions are set to a redirection, but the ‘Trigger live search when typing’ is turned off as well: https://i.imgur.com/gPOOXCj.png
December 7, 2017 at 2:35 pm #15782zainabubu
ParticipantYes, I turned off live search and I have now turned it on, but the result is more of the issue. When I type in a product variable name, I don’t get the result your plugin usually gives. Regarding the redirection, isn’t that how it should be? When I set it up this way in my last theme, it worked.
I don’t think your plugin is in use here…after turning on live search, the result remains the same
-
This reply was modified 8 years, 6 months ago by
zainabubu.
December 7, 2017 at 2:52 pm #15784Ernest Marcinko
KeymasterHi,
I just checked the front page, but the changes I made are reverted, that is the default plugin. Have you re-installed or updated the theme by any chance? The changes within the theme file are not there anymore.
December 7, 2017 at 2:55 pm #15785zainabubu
Participantoh wow, I did an update on a separate plugin…that shouldn’t have affected your work. Apologies. Would the future theme updates affect this also?
December 7, 2017 at 3:08 pm #15787Ernest Marcinko
KeymasterThe theme updates will, unfortunately, plugin updates not likely. WordPress automatically replaces all theme files with the ones in the update package.
For that reason I usually recommend creating a child theme, and copy the modified file there. The if you activate the child theme, it will automatically get the actual parent theme, but load the modified files from the child theme directory. This does not get overwritten during theme updates, it is made for persistent changes. You might have to ask the theme author about how to create one for this particular theme, as there is no global solution that works with all themes.
Alternatively, I can make the change again, and link you a copy of the modified file. Each time there is a theme or theme related plugin update, you can restore it. Let me know.
These are not the most elegant solutions, but since the theme search is hard-coded, there is no other way to replace it.
December 7, 2017 at 3:15 pm #15788zainabubu
ParticipantMany thanks! Kindly do so and send copy of file. Will see what I can do regarding how to create the child theme too.
December 7, 2017 at 3:50 pm #15789Ernest Marcinko
KeymasterSure! I made the change again, and this is the changed file for future use: https://gist.github.com/anag0/cae485a488bf5240e4029d35771d8400
December 7, 2017 at 8:14 pm #15790zainabubu
Participantmany thanks! But now I no longer have a search bar in the header area…
December 8, 2017 at 10:23 am #15800Ernest Marcinko
KeymasterHi!
Are you not seeing the search bar in the header like this? https://i.imgur.com/cKwIGSp.png
Make sure to reload the page by hitting CTRL + SHIFT + R as well as clearing the site cache if there is any.December 8, 2017 at 10:45 am #15801zainabubu
ParticipantHello, I have done that, but for some reason, it seems to not be loading on chrome. Safari loads it ok. What browser are you using?
-
This reply was modified 8 years, 6 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.