Include categories in keyword search
-
I am trying to include the categories with the search keyword query. I have been modifying the wp-job-manager-functions.php page and have had no luck, see below.
$post_ids = array_merge( $post_ids, $wpdb->get_col( $wpdb->prepare( “
SELECT ID FROM {$wpdb->posts}
LEFT JOIN $wpdb->term_relationships ON (ID = $wpdb->term_relationships.object_id)
LEFT JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
OR $wpdb->term_taxonomy.taxonomy = ‘%%%s%%’
WHERE post_title LIKE ‘%%%s%%’
OR post_content LIKE ‘%%%s%%’
AND post_type = ‘job_listing’
AND post_status = ‘publish’
“, $args[‘search_keywords’], $args[‘search_keywords’] ) ) );
The topic ‘Include categories in keyword search’ is closed to new replies.