$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 to order posts on each different category?
- Intiger meta value with ‘>=’ returns posts with lower value
- Display posts with specific value first in query
- get_posts custom field
- Get every post with value in meta key
- Using get_posts to get posts based on a checkbox value with Advanced Custom Fields
- 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 posts using less than
- Retrieve select tag custom values from array and display them in current page with wp_query?
- How to use a dropdown to filter posts by custom field
- Order WP_Query results by meta key value in custom query
- Notice thrown when creating numeric pagination on custom query
- Excluding posts with certain value of meta_key keeping posts without that meta_key
- Query only displays one page_id
- Pagination in html table is not working
- Content not displaying on paginated page
- Querying a large number of posts including their custom fields data
- Paging + WP Query
- Display post meta conditionally based on it’s value
- Query using string from custom field as array value
- How to show list of posts with custom field value (a date) that are coming soon
- add_query_arg to compare and display events from a certain date
- WP_Query custom order and pagination
- Comparing 2 Decimal Numbers from custom fields and displaying posts
- Sorting posts by Multiple custom fields in defined order
- Second loop pagination changes URL, not content
- Unable to paginate a custom page query
- I am officially missing something about transient posts
- Query Not working as expected
- WP_query paged pagination with excluded category still counts it
- max_num_pages says 4, yet I am only able to navigate to the third page
- Custom Homepage Pagination using WP_Query
- Paginate pages with dynamic query
- filter posts by meta key with pagination
- Determining what post is displayed out of total posts found
- Trouble Making WP_Query paged
- Adding pagination to sub-wp_query within a singular post page
- How to filter a static post page with ajax and $wp_query
- Pagination problem by using WP_Query
- Ajax (jquery) wp_query pagination returns -1
- WP_Query and pagination AGAIN?
- WP_Query Pagination
- WP_Query, Paginate by Custom Field
- meta_query weird behaviour, static int will work, but not user data
- Query multiple post types, but different order for each
- Order by the first array within a meta_query
- Reciving Error 404 blog/page/2/
- Woocommerce Shortcode which displays a table with product data
- Query ACF relationship field – Comparator IN – Value array
- Why is my pagination /page/2 taking me to index.php?
- Function the_posts_pagination() not compatible with WP_Query arguments
- adding pagination to a foreach loop in wordpress
- 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
- How to _GET multiple value checkbox WP_Query in Custom Toxonomy / Custom Fields
- paginate_links appearing on page but it doesn’t actually paginate – pagination on a static page with a dynamic `post_type` argument on a static page
- How do i create a custom post query when the meta value is an array?
- wordpress pagination wont render on custom page template even though its right under the loop like the documentation says so
- How to add a “base” filter for all posts visible to visitors on the site?
- Sort custom post by custom field if none order by latest release
- Pagination of custom page with custom fields query
- display ACF repater field in archive page
- Query posts by post type, author and post meta
- pre_get_posts pagination not working
- 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
- WP Query – grouping posts by same meta key, adding together values from another key
- Pagination repeating posts on search results
- Retrieve all custom field values of a specific custom field metakey as an array, inside WP_Query
- Pagination not working on archive.php template?
- WordPress Sub Category Archive, Show Extra Empty Page Number in Pagination
- meta_query is overriding default search
- WP_query pagination on frontpage
- Trouble with serialized metadata
- Categories In English version showing not canonical URL, instead shows query search result
- Comparing Meta Field date in WPQuery using Meta_Query?
- Pagination unique to a widget
- Getting posts by custom field value
- Pagination inside the blog page not working
- Pagination for Category does not work
- Query against multiple locations within single custom post type post
- Why pagination is not working with tax_query param?
- Pagination on archive.php not working?
- paginate_links method doesn’t show second page of my custom wp_query
- Wp_Query Post per page not working?
- Query post by Category and custom file (ACF)
- Pagination Shows Up But Won’t Work on Custom Gallery Page
- WP_Query, ACF field and array
- Problem with my loops
- Custom Query Pagination not working on static front page
- Order 2 meta_queries differently in WP_Query?
- Order by Date Custom Field
- ACF Post Object meta-query by title not ID
- Sort posts on custom field AND after that sort on date?
- using custom meta user data to run queries in WordPress
- 404 page on custom search pagination
- WordPress search page pagination displaying but not functional