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

WP_Query to get posts in a specific category and post format

Two problems i see: change aside to post-format-aside and since you are using foreach loop change new WP_Query( $singargs ); to get_posts( $singargs ); so your code sould look like this: <?php $singargs = array( ‘numberposts’ => 1, ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘category’, ‘field’ => ‘slug’, ‘terms’ => array ( … Read more

Update Loop with Form

Yes, AJAX is the way to go. Basically, you can write your own callback function for WP’s ajax hook in your theme’s functions.php file. And then your function can return data in any format you choose. I generally return JSON. I’ll walk you through setting it up. First, since it doesn’t appear that your visitors … Read more

Paginated HTML Sitemap

Haven’t tested this, but here you go, lemmie know how it works. You’ll needa do your own pagination links, but that should be pretty straightforward //pagination $offset=”0″; $no_of_posts = the_posts_per_page( false ); //Number of posts to display on each page if (preg_match( ‘/page/’, $_SERVER[‘REQUEST_URI’] ) ) { $uri = explode( “https://wordpress.stackexchange.com/”, $_SERVER[‘REQUEST_URI’] ); foreach ( … Read more