$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'tag' => $taxonomy,
'post_type' => 'initiative',
'paged' => $paged,
'posts_per_page' => 9,
'category_name' => $category,
'tag__not_in' => array(15),
'meta_key' => 'initative_weight',
'orderby' => array('meta_value_num' => 'DESC', 'title' => 'ASC'),
'post_status' => 'publish'
);
I changed tag__not_in to an array and updated the orderby to be an array as well.
Related Posts:
- How can i retrieve default post per page value? from settings->reading. And total number of posts?
- Pagination with custom SQL query
- How can I use order_by to order by two meta_keys without excluding posts that don’t have those keys initialized?
- Different ‘posts_per_page’ setting for first, and rest of the paginated pages?
- Custom WP_Query order by post_meta and (author) user_meta
- Query causing load because of SQL_CALC_FOUND_ROWS post counting?
- Pagination with 5 posts per page
- Pagination custom query
- Sorting Posts by custom field
- Order posts by date and then by custom field
- Pagination wont work with search results template [duplicate]
- Pagination Not working on Home Page with 2 Query
- Best Practice For Querying Grandchildren?
- Pagination not working for category posts
- Querying by taxonomy vs Querying by Custom fields Speed Comparison
- Search – Ajax – Alter Query Parameters with Pagination
- Two queries on the same page with pagination
- Show single post then all posts (with pagination)
- meta_key and meta_value not working together
- WP_Query pagination not working in admin area
- Custom Field sort not working (WP 3.8.1)
- Pagination working everywhere but the index page
- WP_Query ajax loader detect end of posts
- Storing query variable and then using wp_reset_query
- exclude posts with a specific custom field and value
- How to set pagination to work with ‘/page/’?
- WP_Query Pagination on multiple-loop page breaks WP or doesn’t show up
- WordPress Pagination changes my template
- meta_query BETWEEN, but the range is stored in the custom field
- Get a list of posts with associated meta_value
- Custom Pagination Layout for Elementor widget
- WordPress pagination not working on template search.php
- Pagination links missing for first link (1) and previous button? How to get pagination links to work?
- Pagination outside of loop
- How to return a 404 when custom query matches nothing?
- Large AND OR query timing out
- Multisite pagination issue by multi query archive 404
- Custom Pagination in Shortcode with WP_Query
- Categorising search results based on Custom Fields
- Pagination for blog posts reloading same page [closed]
- Search posts missing a particular custom field
- Append URL query to next post link in custom query
- How to compare a date in custom field with today’s date in custom WP_Query?
- Pagination is not working with custom query inside a homepage template
- Display single most recent post in category on every page of category archive
- Conditional operator OR not working with custom fields
- WP_QUERY with group by with custom fields
- Display posts with specific value first in query
- get_posts custom field
- wp_query posts with custom fields number smaller than
- Page navigation doesn’t seem to work when I add offset?
- Posts query according to meta box date
- create metabox to activate slider
- Query only displays one page_id
- Display post meta conditionally based on it’s value
- I am officially missing something about transient posts
- How to filter a static post page with ajax and $wp_query
- WP_Query Pagination
- WP_Query, Paginate by Custom Field
- Reciving Error 404 blog/page/2/
- ACF: How to query for a given value count of an array like field? (e.g.: How many rows has a `flexible_content` field?)
- duplicated posts when using pagination
- wordpress pagination wont render on custom page template even though its right under the loop like the documentation says so
- display ACF repater field in archive page
- How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?
- How to use the Term Object from a custom select field in a query
- Pagination repeating posts on search results
- Trouble with serialized metadata
- Categories In English version showing not canonical URL, instead shows query search result
- Pagination for Category does not work
- Query against multiple locations within single custom post type post
- WP_Query, ACF field and array
- Problem with my loops
- Order by Date Custom Field
- Sort posts on custom field AND after that sort on date?
- 404 page on custom search pagination
- Paging works correctly on local version, but not live?
- Pagination not working in custom loop WP_Query
- Showing the correct number of posts_per_page when avoiding the use of post__not_in
- WordPress pagination not returning posts on second page
- Paginate nested query of child posts
- previous_posts_link not working in WordPress pagination
- Pagination not working with WP_QUERY
- Custom search (wp query by custom fields)
- WP_Query with meta_value_num and meta_query not paged correctly
- How do I display posts with specific value in a custom field into my loop?
- Custom Search Query – include only custom fields and title
- Pagination with WP_Query not working
- wp_query pagination links producing 404
- Why won’t my paged wp_query work? [duplicate]
- WP_Query breaks pagination
- Pagination doesn’t work for home page custom post type query
- Loop issues when creating custom query for media uploader
- Query multiple taxonomies with pagination
- paginate_links() with Custom Taxonomy
- Pagination problem with multiple loops on the same page
- Taxonomy related query not working
- error with $query->have_posts()
- WP_Query – order with usort by custom meta
- Pagenavi with archive page