Searching in content even when content option is set to "NO"

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Searching in content even when content option is set to "NO"

This topic contains 11 replies, has 2 voices, and was last updated by djmhim djmhim 4 years, 3 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #17721
    djmhim
    djmhim
    Participant

    Dear Team
    I am facing some issue with the plugin.

    I when I search Dra, then it should show those courses which have taxonomy or course title word “Dra” in it, but it’s searching those also which having “Dra” word in content also..

    In admin, General search setting is for course and setting is as below:

    Search in title? – Yes
    Search in content? – No
    Search in comments? – No
    Search in post excerpts? – No
    Search in post permalinks? – No

    Search in post (and CPT) IDs? – No

    Search in terms? (categories, tags) – Yes

    I want that it search only those courses which have taxonomy start with “Dra” or somewhere in the title. There getting same kind of issue with other words also but in simple I can tell “Dra” word because this one is using most…

    Please try to search “Dra” and you will see, last some like 2-3 are not linked with any taxonomy which have “Dra” word in it like drawing etc, and not even in title. But still it’s in the search

    Can you please have a look,
    Thank you

    #17723
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for the proper details. I tested all the results, and there is indeed 1 result there, that seemingly does not match any taxonomy.
    All the other ones have a matching taxonomy term name, I have found in the Course editor screen. I have marked the matches on this screenshot: https://i.imgur.com/WeowXOn.png

    The only item left is the “City & Guilds Level 3 IVQ Technician Diploma in Construction”, which does not seem to match anything. So I logged in via FTP, and added a debug code to see what exactly was matched there. The query works correctly, the content is not matched, however a taxonomy term was.
    The taxonomy name is yst_prominent_words and the matched term name is exatly “drawing and surveying techniques 2”. This is connected to that post. It is not visible in the editor, so I’m guessing that this might be some sort of a leftover taxonomy from a plugin that you may have used before(?). The prefix “yst_” might indicate a YOAST plugin, maybe YOAST Seo? It could be something else of course.

    Best,
    Ernest Marcinko

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


    #17728
    djmhim
    djmhim
    Participant

    Hello
    Thanks for your reply
    So, can one thing be possible to do? That it don’t suggest only things listed below
    1. Taxonomy with that text. Like Dra is Drawing etc because there are more taxomomy also which start with Dra but it’s not in suggestion list when we type dra
    2. Now it’s suggesting those posts which hare lined with taxonomy which start from Dar, instead of this, if it display only those posts, which are having dra in title itself. I mean, it suggest only those taxomonies and posts titles, which have “dra” word in it. No another title to appear which don’t have this word in it

    Here “Dra” is just an example, hope you got what I am telling. I know it’s bit confusing but I tried my best to explain it

    Thanks

    #17749
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    I think I understand πŸ™‚

    1. On the General Options -> Sources 2 panel, you can choose which taxonomies to use to return terms from. Terms from the choosen taxonomies will be returned as results: https://i.imgur.com/aaW60JV.png

    2. In that case, under the General Options -> Sources panel (scroll down), turn off the Search in terms? option: https://i.imgur.com/s9GtbeK.png

    With this configuration, only taxonomy terms and course titles starting with the phrase will be returned.

    Best,
    Ernest Marcinko

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


    #17754
    djmhim
    djmhim
    Participant

    Hi,
    Thanks a lot for your reply
    1st one is ok but having issue with 2nd one
    There are lots of posts which have words starting with mar (Eg Marketing) But when I type Mar, it show me taxonomies but not those posts titles.
    Also it’s like repeating Marketing Marketing. I think, it’s because Marketing word is in both taxonomies which I have added there. Any solution for this so that it don’t repeat?
    And thank you very very very much for your this amazing support..

    #17759
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    I could not find any course titles starting with ‘marketing’. It is only contained within the post title, but no course title is starting with ‘marketing’.
    On the General Options -> Logics & Behavior panel, you have set to only match items that start with the phrase: https://i.imgur.com/yMxs4NF.png
    You should try the ‘Anywhere’ options instead, it will match the ‘marketing’ keyword anywhere in the title.

    They are not actually repeating, those are terms from different taxonomies, linking to different taxonomy arhives. The best possible solution is to choose only one taxonomy to return as results, whicever you prefer.

    Best,
    Ernest Marcinko

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


    #17763
    djmhim
    djmhim
    Participant

    Hi,
    Thank you a lot.
    I have put it on “Everwhere” but getting another issue with this. It’s searching those also, which don’t have any word in it starting with “mar” (Please check attachment)
    Thanks a lot for amazing plugin and super amazing support.
    Thank you

    Attachments:
    You must be logged in to view attached files.
    #17785
    djmhim
    djmhim
    Participant

    Hello
    I think you are very busy
    Have you got my last comment?
    Thanks

    #17786
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thank you for your kind words πŸ™‚

    I’m afraid that is not possible with configuration. The ‘starting with’ option there refers to the start of the whole field (whole title), not the start of the word within the field.

    However, since you added FTP access, I made a tiny modification to the main CPT search file. Now it will return:
    – Taxonomy terms that start with the entered phrase
    – Courses which start with the phrase, or Courses where any word in the title starts with the phrase. “Ex. ABE Level 6 Diploma in Marketing”

    I think this is the closest possible solution. The file I changed was the www\v2018\wp-content\plugins\ajax-search-pro-413\includes\classes\search\class-asp-search-cpt.php file, please make a copy of it. An archive copy you can also find here.

    Best,
    Ernest Marcinko

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


    #17795
    djmhim
    djmhim
    Participant

    Hi, It’s working
    Thank you very very very much
    Now just one last question related to last answer.
    You have updated file from your plugin. If I update the plugin later, will this file be replaced with new file? And then it will remove this updated coding again, right?
    Or it will be ok…

    #17803
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    You are welcome.

    Yes, an update will unfortunately overwrite the file. I will try to incorporate a feature to the upcoming release, to somehow enable this modification if possible, I am not sure how yet.

    For that reason, please keep the copy of it for now. In case you upgrade, you can just replace it with the current one, and it will do the trick.

    Best,
    Ernest Marcinko

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


    #17814
    djmhim
    djmhim
    Participant

    Ok,
    Thanks a lot for your help
    You are super amazing.
    For updates, can see another file which never overwrite on any update πŸ˜‰ and include in it main file.
    I mean, you provide that file as empty file in each update where people can write their custom code but if file already exist in website, then it don’t replace πŸ˜‰
    Just suggestion. You are expert in it :p
    Y the way, thankssssssssssssssss a lot again.

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

You must be logged in to reply to this topic.