Exclude WordPress Tag Widget

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Exclude WordPress Tag Widget

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

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #24297
    band_design54
    band_design54
    Participant

    Hi there,

    We left the following comment in the CodeCanyon comments:
    “We have implemented search on behalf of our client who has purchased this plugin.

    The issue we are having is the search is picking up the WordPress Tag Cloud widget that is used throughout the pages. So it’s pulling through items that are not relevant or not required.

    Is there anyway we can exclude all tags from the search?”

    You replied with:
    “That is very unlikely, if it’s not part of the post content, then the plugin cannot search it. I suspect it is rather something with the configuration. Please open a support ticket, and I will take a look”

    We have two search instances on the website:
    1. in the top header, this searches post types Products and Posts.
    2. On the Blog archive and article pages, this searches posts only.

    The WordPress Tag Widget is been used for search results. An example of this:
    1. using either of the search instances, search “roof top chains”
    2. one of the results cards is – https://ssl.banddevelopment.nz/sales-representative/ (see attached results-page.png)
    3. the words “roof top chain” is not in the post content, rather in the Tag feed in sidebar next to post content (see attached tag-results.png). This is what we need to exclude.

    Cheers,

    • This topic was modified 4 years, 6 months ago by band_design54 band_design54.
    Attachments:
    You must be logged in to view attached files.
    #24302
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you very much for all the details, I was able to find the issue – it was only a configuration related problem.

    On both search instances, the keyword logic was set to “OR” – meaning that any of the entered keywords could match even partially. So the results shown contained either of those words.
    I suspect you want a more strict logic, so I have changed it to “AND with exact keyword matches”: https://i.imgur.com/nNdYHo5.png
    Now you should see much different search results, with more strict matching.

    Best,
    Ernest Marcinko

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


    #24309
    band_design54
    band_design54
    Participant

    Perfect! Thank you for all your help!

    Cheers,

    #24310
    band_design54
    band_design54
    Participant

    Hi Ernest,

    Sorry one other thing – We’re trying to search the contents within Tablepress tables used on a CPT called Products and return the pages/products that contain that table.

    We adjusted the search to use index engine and followed your steps from here – https://wp-dreams.com/forums/topic/ajax-search-pro-5/

    Though we then couldn’t get any results showing for both tablepress and non-tablepress product pages.

    Any ideas on what steps we need to take to get this working?

    Cheers,

    #24315
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Is the index table enabled on both search bars? It is a common mistake, it would explain the issue.

    Best,
    Ernest Marcinko

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


    #24324
    band_design54
    band_design54
    Participant

    Hi Ernest,

    Thanks for that, yes the search engine was set to index table for both instances and then new index was created. Tablepress Tables were also selected as a post type to search in the index tables options. Still not returning any results for Tablepress content. Also when searching for non-Tablepress content, the search results are very minimal or none. Whereas the when using the regular search engine, pulls everything fine but Tablepress content.

    The Tablepress short code is being printed in the template using do_shortcode within an Advanced Custom Fields flexible content module. Would that be causing the issue of the content not being found?

    Really appreciate any help to get this working.

    Cheers!

    #24331
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Yes, that is definitely the cause then. Since you added FTP credentials, I have implemented this custom code to the functions.php in your theme directory. I assumed from the ACF configuration that the field name containing the items is named ‘content_elements’, so I have added that to the code.
    Then I re-indexed everything, and the keyword count went up to 13k, but I am not sure if the tables are indexed, you might have to test that. It is also possible that I have not added the correct field, in that case, please edit the code, and add it to the $field_names variable, then re-index everything. It might do the trick.

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.