Images not working

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 5 years, 11 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #17829
    topthepodium
    topthepodium
    Participant

    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/b4WuhUW

    1. 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

    #17830
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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 :)


    #17831
    topthepodium
    topthepodium
    Participant

    Hey 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?

    #17832
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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:
    Generating the index table
    Enabling the index table

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #17834
    topthepodium
    topthepodium
    Participant

    Thanks,

    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”

    #17844
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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 :)


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.