Excluding Categories

This topic contains 10 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 8 years, 3 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #6863
    kristina87
    kristina87
    Participant

    Hello,

    I have trouble excluding categories.

    I’ve dragged the ones I want excluded in the Frontend Settings > Categories

    However when the search results hover, they include the posts in the categories that I excluded. When I click on “more results” – then they ARE excluded.

    Please advise what setting I may be missing.

    Thanks
    Kristina

    #6867
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    The Frontend Settings > Categories only affects the visibility of the category selectors on the fornt-end settings drop down.

    To exclude the results from specific categories completely, go to the Advanced Options panel, there is a similar drag-drop item to exclude categories πŸ™‚

    Best,
    Ernest Marcinko

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


    #6872
    kristina87
    kristina87
    Participant

    Hi Ernest

    Thanks for the response!

    I have excluded there as well.

    However I realized what the problem is.
    When it hovers, it finds COMMENTS made in those excluded categories.
    I do need comments to be searchable in general – it’s quite important. But the comments in hidden categories need to be excluded.

    Any way to fix this?

    Thanks
    Kristina

    #6873
    kristina87
    kristina87
    Participant

    Ok so heres the problem:

    http://www.anticanceralliance.com/
    username Team3
    pass: test

    search form is here http://www.anticanceralliance.com/category/hypotheses/

    category called mapnd private is a category that I excluded in frontend and advanced setting

    try searching for “mapnd” – you get “good discussion on dose…” in the hover results – thats a comment from an excluded category. now when you click on “more results” – you do not see it.

    Now I have a comment in a visible category, I called it “testcommentsearch” – it comes up when the results hover but not when I click on “more results”

    Im not sure whats happening here – are comment searches somehow not visible in the results page or is it just that it excludes whatever showed up when results hover?

    Plus the original question – how to prevent it from showing comments from excluded categories

    Thanks!

    #6874
    kristina87
    kristina87
    Participant

    sorry password above is “team” not test

    #6886
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    The problem with comments is that they are not custom post types (like posts, pages, products and so on) therefore they are a bit more problematic.

    Unfortunately it is not possible to show them by clicking on the “More results” link. That url redirects to the theme default search page, which can only display posts, pages or custom post types – but not comments, users, terms. It’s not the plugins fault, nor the themes fault, it’s simply how WordPress is constructed at the moment. I’m not aware of any method to make this possible at the right now.

    As for the categories, that might be possible actually. Currently it’s not implemented as it was never requested, and to be honest I never thought of it. But I think I might be able to do something about it.
    Let me make try to implement this on my test environment, and I will let you know which file to replace to make it work.

    Best,
    Ernest Marcinko

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


    #6897
    kristina87
    kristina87
    Participant

    Hi Ernest,

    My default search actually does display comments as I have a plugin called search everything.

    I believe there is an option in Ajax to override or not the default search, right?
    So if I don’t override it – comments do come up. If I do, then I think the category selection for the posts is lost.

    When you say categories – I’m assuming you mean excluding comments coming up from categories that have been excluded? That would be wonderful & very critical for me. The excluded categories are private and hold intellectual property – so comments cant be visible.

    Thank you!
    Kristina

    #6899
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Kristina!

    Wow, I didn’t know it was possible yet. I know that plugin, but I didn’t know it had that feature, amazing. Thank you for telling me. I guess I was wrong πŸ™‚

    In that case if I may suggest turning off the override on ajax search pro. If it’s turned off I believe the search everything override will activate and display the comments on the search results page.
    I will examine Search Everything, hopefully I can learn how to mix comments into the results list and implement a solution to the ajax search pro as well. I’m afraid I can’t give you a quick fix to that soon, it’s definitely much more complicated as category exclusions.

    Yes, exactly that – excluding comments from categories that have been excluded.

    Today I have a bit of a peak of support requests, so you might have to wait until sometime tomorrow until I can fix this issue, I hope it’s not a problem.

    Best,
    Ernest Marcinko

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


    #6900
    kristina87
    kristina87
    Participant

    Tomorrow is perfectly good, thank you Ernest!

    I will play around with the settings for now.

    Kristina

    #6902
    kristina87
    kristina87
    Participant

    Just to add – turning override off does not actually work because as I thought – it erased whatever category selection that was made in ajax. Which sort of defies the purpose πŸ™‚

    What I think I will do I think is have 2 separate search boxes – one for comments alone (with category selection)- displaying results with pagination instead of “view more” and the 2nd a regular search for categories etc – excluding comments completely. In a twisted way it may actually make sense for the users πŸ˜‰

    However if you came up with a way to get ajax to display comments in results – it would certainly be welcomed news. I believe something called relevanssi (sp?) also searches for comments.

    Best Regards,
    Kristina

    • This reply was modified 8 years, 3 months ago by kristina87 kristina87.
    #6931
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    I think I have great news for you πŸ™‚ I didn’t manage to finish on friday, sorry about that.

    So I just finished testing and it looks very promising. I’m attaching the changed version to this reply.
    In this version the comments respect the category exclusions, and also they should be display when you click on the “view more” link as well.

    Please let me know how it works.

    Attachments:
    You must be logged in to view attached files.
    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.