This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Hiding unpublished items

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #11644
    mook25mook25
    Participant

    HI, The search function works great but it seems to also index non published posts and products. I only want it to search products that are published i.e. live, not ones that i am still working on. Is this possible and if so how do I do it.

    I have had a look at your knowledge base but can’t seem to find what i am looking for.

    #11647
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Thanks for the proper details, I have checked the configuration and found the problem.

    By default the plugin only looks for published items and nothing else, so I suspected some kind of misconfiguration.

    What I have found that on the General Options -> Sources 2 panel you had every taxonomy selected to return as results, which I’m not sure you wanted at all. So the problem most likely was that some taxonomy terms (like tags, categories) were also in the result list, at some of them might had the same names as posts or products.

    I simply turned all of them off, tried a few search phrases against unpublished items, but I don’t see any in the results, only published ones, so it should be all right now.

    #11658
    mook25mook25
    Participant

    Hi, Thanks for taking a look and your quick response. The search definitely looks a lot cleaner front end than it did before however i noticed that there are still some products showing that shouldn’t be e.g NUMARK N-WAVE 360 DJ Monitor when I type in the search box ‘speakers’.

    On further investigation it appears the above example is indexing the Bin so although i could empty the bin and the problem will probably go away, is there a way to stop it indexing this as i don’t always empty the bin sometimes for days at a time?

    Thanks again for what is a great product and i will definitely be rating you positive once this is sorted.All logins are the same as before if required.

    #11659
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi again!

    Indeed, something is not right. I’ve digged more into the problem, and it appears to be a recently discovered WooCommerce bug, whereas trashing a product, will not trash product variations – they stay published in the database. Here is the issue #12774, and apparently they are fixing it within the 4.7 release: fix #12798

    However I was able to create a temporary workaround. Just add this code to the functions.php file in your active theme directory:

    This will check for orphan variations within the results, and delete them before the output.

    #11677
    mook25mook25
    Participant

    Thanks again for outstanding support. I’m off to go rate the product and support now. Good work!

    #11680
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Hiding unpublished items’ is closed to new replies.