__( 'Adds a Search Form with category selectors', 'absc' ) ) ); } function widget( $args, $instance ) { extract( $args ); echo $before_widget; $title = apply_filters('widget_title', $instance['title'] ); $hide_op = ( $instance['hide_op'] != 'off' && $instance['hide_op'] != '' ); if ( $title ) { echo $before_title . $title . $after_title; } $incoming_search_cats = ( isset( $_GET['absc_search_cat'] ) ) ? (array) $_GET['absc_search_cat'] : array( 'empty' ); $mode = $instance['mode']; $connector = ( 'and' == $mode || '' == $mode ) ? __( 'and', 'absc' ) : __( 'or', 'absc' ); ?>
'; //print_r( $categories ); print_r( $instance['categories'] ); echo ''; */ ?>
/>
/>
will be searched
the posts that are simultaneously in all the selected
categories. If you choose OR, it will be
searched the posts that
are at least in one of the selected categories.', 'absc' ); ?>
notice that when using "and mode" the search will be
done against posts which strictly belongs to selected categories in the
search widget. For example, lets say you have posts about bycicles
and have the following categories: Condition with new and used as subcategories
and colour with blue and white as subcategories. When a visitor searches for
keyword "alterrain" and selects All for condition and All for colour he will
obtain the bycicle posts which are marked as belongin to the general categories
"condition" and "colour". If they belong to "white" but not to "Colour" they will
be not displayed in the result.', 'absc' ); ?>