I solved it by creating 2 different wp query and then merging them. I also excluded the post ids of 1st query in 2 query to avoid duplicate items.
Related Posts:
- Isn’t Returning Value While Using SELECT COUNT(*) FROM {$wpdb->prefix}
- AJAX handler throws 400 (Bad request) – why?
- ajax live search for post title
- Finding all results from database within 500 miles of the given latitude and longitude [closed]
- How to save Uploaded image in custom option panel?
- Working Bootstrap Carousel Conversion to WP – Technical Questions
- How to count data records in wordpress which have same meta_value in wp_postmeta table?
- Display a function using AJAX
- Add external js file to footer with id
- Ajaxing function in widget class
- woocommerce target button with class after ajax update
- jquery won’t load in footer
- WordPress doesn’t Load JQuery Now? Do I need to enqueue JQuery also?
- Woocommerce checkout field maxlength, make input number field only (postcode)
- list tags with count in author profile page
- Replace menu links with # and add name to its li
- wp_is_mobile dequeue not working
- How to delete taxonomy term when a wordpress user is removed?
- Loading CDN that requires jQuery in WordPress
- is_customize_preview() like function to check if Customizer “Live Preview” in JavaScript
- How to load jQuery in the footer – nothing works for me
- Having a Function Inside of the Loop
- Which action does wp_update_user triggers?
- Allow Post Author to be 0 on Update
- how to search users by ajax live search
- Trouble with adding a wp_enqueue_script on wordpress
- WP Ajax Function Always Returning undefined
- Scripts not appending to element in AJAX call – why?
- How to change the order of Jquery in the footer of my theme?
- how to en-queue jQuery to load before the tag
- meta tags doesnt fetch data from permalinks
- Attempt to change jQuery version caused White Screen of Death
- Configuring a meta query with multiple post types that have the same relationship on a single page
- Load jquery only for certain pages in the backend
- Change CSS for logged in users
- Always the Latest google jQuery instead of default WordPress jQuery
- Accessing two databases wordpress
- Add a jQuery Function
- jQuery does not work
- Can’t call Javascript function – scope?
- Changing parent element’s class or style
- Enqueuing latest version of jQuery into a child theme returns a blank screen
- Make a SQL query with wpdb in WordPress
- echo custom fields with AJAX
- In jquery use php variable to execute an enqueued jquery file
- Run a jquery script on on a certain template page
- Add php code to wp_print_scripts?
- Wp-query Order By problem
- How is $current_page passed in woocommerce_account_orders function?
- How can i unload effect.min.js file?
- Loading two different AJAX requests on two different pages
- Multiple meta_key ordering with pre_get_posts
- Where is this JQuery coming from?
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- Auto scroll to id on page load on all pages except home page. Only do this on mobile
- How to load jQuery in TOP of wp_footer?
- Add loggedout class on body using a function or JS
- Are innerHTML elements visible to jQuery functions?
- Include Jquery libraries in wordpress theme?
- Why a SlideShow (made using JQuery FlexSlider) can’t work if I load it form functions.php but work if I load it from my footer.php file? [closed]
- get content from page through AJAX
- Creating multiple category drop down
- How to setup a popup registeration page in wordpress with function.php
- colorbox not loading in
- How to add php within jquery
- Help with IF has focus then… statment
- How to apply the ‘current_page_item’ class to an archive page in `wp_list_pages()`?
- Filter for replacing the WP_query object for a given category
- WP_Query for Attachments not working as expected
- Ajax filter with loadmore button
- query_vars treat as single var from URL
- Populate Product Regular Price with a calculated ACF Field Value
- Hide ‘add to cart’ when certain value in dropdown is selected
- Writing a function for WP Cron to run a SQL command daily
- sort title descending with title with number
- Finding post ID dynamically on click
- Images with overlay
- How to use `foreach()` in ajax call
- How To Display Author Popup on Entry Meta (Genesis Framework)?
- WordPress Ajaxifying not working properly
- Execute jQuery with custom event listener after successfully add an item to the cart
- Pagination not working on my archive page for a custom post type
- How to exclude posts with empty and non-existent relational custom field with meta_query?
- What to do to have access to WordPress functions
- Automatic add space if user enters number(any digit)
- WordPress Jquery+scripts enqueue issue
- Moving CDN jQuery to footer does not work?
- Adding a jQuery rotator function
- Function returning queried meta value based on current post ID
- Why are some custom javascript files working but some are not
- WordPress Javascript Widget jQuery Dependency Issue
- How to use different jquery function of idangero swiper dependant on page template?
- Optimizing multiple WP_querys into one call?
- Custom query (author is post_author or meta co_author) with Pagenavi pagination
- Ajax call does not work for this custom code
- How do I get my nav menu to show sub pages?
- Having problems loading Jquery in functions.php
- Owl Carousel and WordPress Integration Via WP_Enqueue
- Insert image between X number of posts but on specific paginated pages?
- WPDB query suddenly not working