Support » Plugin: Advanced Woo Search » Exclude hidden products from search

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hi

    It is something that must be added to the next version.
    For now you can manually add some lines of code to enable this feature.

    Add this

    $custom = get_post_custom($id);
    
    if ( isset( $custom['_visibility'] ) && $custom['_visibility'][0] == 'hidden' ) {
                        continue;
                    }

    To the class-aws-table.php file after this lines of code

    foreach ( $posts as $post ) {
    
                    $terms = array();
    
                    $id = $post->ID;

    And is it possible to exclude products with visibility “Catalog – visible in catalog loops, but not search” ?

    Thank you.

    Plugin Author ILLID

    (@mihail-barinov)

    Hi.

    Yes, it is possible.

    Update the lines of code that i write above

    $custom = get_post_custom($id);

    if ( isset( $custom['_visibility'] ) && ( $custom['_visibility'][0] == 'hidden' || $custom['_visibility'][0] == 'catalog' ) ) {
                        continue;
                    }

    And don’t forget to click ‘Reindex table’ button

    Oh yeah!! Now it is ok!
    Thank you very much for your support 😀

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Exclude hidden products from search’ is closed to new replies.