How to include TAGS and COMMENTS in search results

Tagged: 

This topic contains 5 replies, has 2 voices, and was last updated by  Vinod Dalvi 1 week ago.

  • Author
    Posts
  • #2705
    fyreum
    Participant
    • Topics: 1
    • Replies: 2

    Hello.

    Thank you kindly for creating your plugin. I will send in a review after my site has been active for a month of I can see how people are using it for their needs.

    Currently, on formatting the options, I have been able to add CATEGORIES with menu-item-type-taxonomy.
    I would like to have the search include TAGS and COMMENTS.

    Could you please let me know the require coding to add in “Search Menu Classes”?

    Best regards

    http://www.fyreum.org

  • #2708
    Vinod Dalvi
    Keymaster
    • Topics: 0
    • Replies: 244

    I hope you are well today and thank you for your question.

    I am not sure exactly what you are trying to achieve with tags, comments and Search Menu Classes so could you please tell me a bit more in detail so that i can help you?

    Best regards,
    Vinod Dalvi

  • #2711
    fyreum
    Participant
    • Topics: 1
    • Replies: 2

    Hello

    I wish that the SEARCH results include terms which match TAGS and if they are in any COMMENTS.

    Right now, only the posts and pages are included when I search a word.

    For Example: If I search a word that matches a TAG then…

    NOTHING FOUND

    Sorry, but nothing matched your search terms. Please try again with some different keywords.

  • #2712
    Vinod Dalvi
    Keymaster
    • Topics: 0
    • Replies: 244

    Currently the plugin only searches post types such as posts, pages etc.

    The plugin doesn’t search for tags and comments but will implement this functionality in the future version of plugin.

    In the meanwhile to achieve this you have to develop custom code by modifying the below hook and search_filter function declared in the plugin file /add-search-to-menu/public/class-astm-public.php on line number 139.

    add_action( 'pre_get_posts', array( $public, 'search_filter' ) );

  • #2713
    fyreum
    Participant
    • Topics: 1
    • Replies: 2

    Thank you for responding.
    I look forward to implementing the update.
    Regards

  • #2714
    Vinod Dalvi
    Keymaster
    • Topics: 0
    • Replies: 244

    Sure we will notify you after implementing that feature.

    You are most welcome here 🙂

You must be logged in to reply to this topic.