how to search in custom fields & custom taxonomy for custom search

Managed to figure it out by adapting that code from the link i posted: function atom_search_where($where){ global $wpdb; if($_SESSION[‘js’] != ”) $where .= “OR (t.name LIKE ‘%”.trim($_SESSION[‘js’]).”%’ AND {$wpdb- >posts}.post_status=”publish”)”; $where .= “OR ($wpdb->postmeta.meta_key = ‘_job_ref’ AND $wpdb->postmeta.meta_value=””.$_SESSION[“js’].”‘)”; return $where; } function atom_search_join($join){ global $wpdb; if($_SESSION[‘js’] != ”) $join .= “LEFT JOIN {$wpdb->term_relationships} tr ON … Read more

How To Capitalize Entries In the Taxonomy Box?

PHP has a function that does EXACTLY what you’re looking for, ucwords(). Leave the CSS capitalize on there, so that the users know it will be auto-capitalized, and then when you’re filtering the input (which you should be doing ANYWAYS, since it’s user input, run it through ucwords() right before database insertion.

wp_query to display custom taxonomy terms

For a custom taxonomy query add the ‘tax_query’ => array() $args = array( ‘post_type’ => ‘featured_job’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => 9999999, ‘orderby’ => ‘date’, ‘order’ => ‘DES’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘job_category’, // custom taxonomy ‘field’ => ‘slug’, ‘terms’ => ‘business’, // taxonomy term (category) ), ), );

How to output content based on same custom taxonomy?

we meet here again 🙂 Try using this: $term_list = wp_get_post_terms( $post->ID, ‘persons’, array( ‘fields’ => ‘ids’ ) ); and ‘tax_query’ => array( array( ‘taxonomy’ => ‘persons’, ‘field’ => ‘id’, ‘terms’ => $term_list ) ), AFAIK, the tax_query accepts field by id or slug only (see here. And the wp_get_post_terms accepts only names (not slug), … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)