Paginated Author.php not using Author.php template

This is not fix for your issue is only an working example of what you can use for the author.php page. <?php $number = 10; $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $offset = ($paged – 1) * $number; $users = get_users(); $query = get_users(‘&offset=”.$offset.”&number=”.$number); $total_users = count($users); $total_query = count($query); $total_pages = intval($total_users / … Read more

WP Query Meta Query

I think the orderby key is at the wrong place. It think it should be like this: $args = array( ‘post_type’ => ‘event’, ‘order’ => ‘ASC’, ‘orderby’ => ‘meta_value’, ‘meta_key’ => ‘your key to order’, ‘meta_query’ => array( ‘key’ => ‘Date Ordering Format’, ‘relation’ => ‘AND’, array( ‘key’ => ‘Event Type’, ‘value’ => ‘4. take-out … Read more

Multiple Meta key in search

You will need to switch between using query_posts (not recommended), to using WP_Query. Using WP Query is similar to query_posts, you will pass an array of arguments, and include the meta_query args. Something like: $args = array( ‘posts_per_page’ => 1, ‘no_found_rows’ => true, ‘post_type’ => ‘rrf-result’, ‘rrf_result_year’ => wp_unslash( ( string ) $_POST[‘result_year’] ), ‘meta_query’ … Read more

WP_Query for posts that have postmeta assigned to a taxonomy

So I found the solution after tons of searching from the events calendar’s website and modified it to suit my needs. The code is as shown below: (Note I also removed the array to string conversion since it’s pretty pointless.) <?php // Support for multiple locations to be filtered. $request_cities = array_map(function($item){return utf8_decode(urldecode($item));}, explode(‘+’, $_REQUEST[‘city’])); … Read more