• Exclude ID doesnt work if nothing selected. If I click on search button without something selected. is displaying every page.
    I also try exclude category ID with this
    add_filter(‘ajax_wpqsf_query’, ‘exclude_search_cat’);
    function exclude_search_cat($args){
    $args[‘category__not_in’] = array(22);//category id you want to exclude
    return $args;
    }
    eg. make category “notsearch” for pages i dont want include in to results. But it doesnt work
    Thank you in advance for your help

    http://wordpress.org/plugins/ajax-wp-query-search-filter/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author TC.K

    (@wp_dummy)

    What is your post type use to filter?
    The ‘category__not_in’ not in is only for wp default ‘post’ post type. If you have other post type, then it will not work.

    Thread Starter Naci

    (@naci)

    i create category and meta box for pages.
    or is there a way display only pages which have one of the taxomonies?
    eg i create this below now if I click on search button without something selected. displaying every page . Also Pages none selected category

    function create_regionalersektor_hierarchical_taxonomy() {

    $labels = array(
    ‘name’ => _x( ‘Regionaler Sektor’, ‘taxonomy general name’ ),
    ‘singular_name’ => _x( ‘Regionaler Sektor’, ‘taxonomy singular name’ ),
    ‘search_items’ => __( ‘Search Regionaler Sektor’ ),
    ‘all_items’ => __( ‘All Regionaler Sektor’ ),
    ‘parent_item’ => __( ‘Parent Regionaler Sektor’ ),
    ‘parent_item_colon’ => __( ‘Parent Regionaler Sektor:’ ),
    ‘edit_item’ => __( ‘Edit Regionaler Sektor’ ),
    ‘update_item’ => __( ‘Update Regionaler Sektor’ ),
    ‘add_new_item’ => __( ‘Add New Regionaler Sektor’ ),
    ‘new_item_name’ => __( ‘New Regionaler Sektor Name’ ),
    ‘menu_name’ => __( ‘Regionaler Sektor’ ),
    );
    register_taxonomy(‘regionalersektor’,array(‘page’), array(
    ‘hierarchical’ => true,
    ‘labels’ => $labels,
    ‘show_ui’ => true,
    ‘show_admin_column’ => true,
    ‘query_var’ => true,
    ‘rewrite’ => array( ‘slug’ => ‘regionalersektor’ ),
    ));

    }

    Thread Starter Naci

    (@naci)

    Sorry for my bad English

    Plugin Author TC.K

    (@wp_dummy)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Exclude ID doesnt work if nothing selected’ is closed to new replies.