Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Images not working
This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko 5 years, 6 months ago.
- AuthorPosts
- May 10, 2018 at 10:07 pm #17829
Hello, (please keep in mind you will need to view the site on mobile – there is no desktop version)
I am trying to build a simple search box/function for my mobile site.
I want my customers to be able to type in a food they are interested in
For example: “wings”
The search only needs to pull up the “SRIRACHA WINGS” page.
However, right now it’s pulling up multiple pages
Below is a screenshot
https://imgur.com/a/b4WuhUW1. How do I add an image for each item to show it in the search box?
2. How do I make it so only the “SRIRACHA WINGS” page comes up?Thanks
May 11, 2018 at 8:21 am #17830Hi,
Thank you for the proper details, it helps me a lot! I have logged in to check the issues.
1. I see that the images were parsed from the post content, but their URLs were incorrect. I’m guessing that a shortcode/filter needs to be executed first, that manipulates their URLs, before it is displayed on the front-end. To resolve that, I have enabled this option: https://i.imgur.com/XtTwXbO.png
That will make sure to execute the ‘the_content’ filter before the images are parsed from the content, they should be correctly displayed now.
2. It depends on which fields you want to search, and which logic you prefer. For now, I have changed the search logic to match whole words only: https://i.imgur.com/c0SNlpz.png
It will match only words that match exactly the entered keyword.Alternatively, if you only wish to search the post titles, you can try this configuration as well, it might be better:
– Step 1 – titles only: https://i.imgur.com/jMpBVMO.png
– Step 2 – or logic: https://i.imgur.com/ZOtyLXF.png
This setup gives better partial matches for keywords like ‘win’, ‘wing’, ‘bur’, ‘burger’ etc..I hope this helps!
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 11, 2018 at 1:42 pm #17831Hey Ernest,
Thank you so much for the quick reply and the mods!
It looks much better!
There are few items, however that are not working when you type them in.
For example:
“Tots” or “BLT Tots”
Any ideas?
May 11, 2018 at 2:06 pm #17832Hi,
You are welcome, and thank you for your kind words.
I see, it happened, because the words ‘tots’ and ‘blt’ were not individually recognized (because of the visual editor HTML content). I have enabled the index table engine for that. Now it should better recognize the words from the post content within HTML tags.
Fore more info about the index table, you can check:
Best,
– Generating the index table
– Enabling the index table
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 11, 2018 at 4:22 pm #17834Thanks,
When I type in “tots” it still brings up the Starters Page and Layout #1 (please see screenshot)
Also, is there a way to add a description below the title for example where it says BLT TOTS
we could have the description:
“crispy tater tots layered w/ creamy ranch dressing & warm smoky bacon, topped w/ crisp shredded iceberg, fresh Roma tomatoes, creamy ranch dressing, more bacon & scallions”May 13, 2018 at 8:13 am #17844Hi,
Because only the Starters page and Layout #1 page had the “tots” within their content at the time, the BLT TOTS post did not exist yet. I suppose you don’t want those, only the BLT TOTS as result. I have turned off the content search instead, it will only look within titles, to give more relevant results.
Yes, of course it can have a description. By default it shows the post content, but you had it disabled. I have re-enabled it for you, here: https://i.imgur.com/D39zHQL.png
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.