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}
- When tax_query used, results disappear (0 =1 produced)
- WP_Query in functions.php
- AJAX handler throws 400 (Bad request) – why?
- ajax live search for post title
- Apply jquery script to only woocommerce product pages and categories
- Order by two meta keys
- Finding all results from database within 500 miles of the given latitude and longitude [closed]
- Replacing select2 in admin backend for all selects
- 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?
- jQuery plugin function is not a function
- Display a function using AJAX
- Enqueuing Script in functions.php vs on the page
- Unable to get_the_content(); of a post in WordPress via AJAX
- How to get user_id from wordpress database inside ajax function?
- Add external js file to footer with id
- Ajaxing function in widget class
- How to load some jquery code to make validation in the theme customizer?
- woocommerce target button with class after ajax update
- Move jQuery and Migrate to footer?
- Gravity Forms field entries into wp_query loop [closed]
- jquery won’t load in footer
- Check if row exists before inserting
- 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
- 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?
- Get Current Post ID in functions php, meta query filter
- How to change the order of Jquery in the footer of my theme?
- How to do set post permalinks using 6 digit random unique function?
- How to search using ajax for exact phrase or words in an input field?
- how to en-queue jQuery to load before the tag
- Jquery implementation not working on page reload
- meta_query not working as expected
- meta tags doesnt fetch data from permalinks
- I can’t enqueue my scripts – They literally aren’t being added to my site
- 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
- Is there a WP function to get taxonomy name from taxonomy_term_id?
- PHP mixed with some JS code to update WordPress theme settings
- Display tags that only appear in one category
- 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
- using jQuery on only one page
- 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
- Adding jQuery datepicker to Custom Post Type Metabox [closed]
- In jquery use php variable to execute an enqueued jquery file
- Custom Query Not Paginating
- Run a jquery script on on a certain template page
- Reset postdata not working on WP_Query in functions.php
- 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?
- wp_enqueue_script | Help me figure out what is causing jQuery is not defined
- 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?
- Passing Jquery value to WordPress function
- WordPress can’t get jquery/unslider to work
- Add loggedout class on body using a function or JS
- Are innerHTML elements visible to jQuery functions?
- Include Jquery libraries in wordpress theme?
- Get the alphabetical sorted data with wpdb
- 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
- Use have_posts() with array of post results retrieved by $wpdb->get_results
- 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
- Get URLs for AJAX Filter Checkboxes WordPress
- Create a CUstom Archive by Year, but just for a Single Category
- Updating custom query var with multiple values
- wp_set_object_term via js btn frontend
- How can I connect to a second database and still be able to use wp functions like get_post_types()?