The code you have provided already has a check to see if posts exist for said query. So all you need to do is expand on it.
...
<?php else: ?>
<p>There is no news related to this theme</p>
<?php endif; ?>
...
Simply place you next query posts in the above code replacing <p>There is no news related to this theme</p>
Related Posts:
- Custom wp_query inside a conditional stament inside a template part doesn’t work: why?
- Issue in If else condition [closed]
- Can I force WP_Query to return no results?
- Multiple WP_Query loops with Pagination
- WP_Query vs get_posts
- WP_Query and next_posts_link
- Too slow when using both ‘tax_query’ and ‘meta_query’ both in WP_Query
- Get array of posts from the current archive page loop
- How-to exclude terms from the main query the most performant way?
- Pagination with WP_Query is buggy – working for some pages, but not the others
- Get the number of posts from the current page results
- How can I save an array from a random post sequence for later use?
- In loop: posts have thumbnail AND other variables
- How to order category.php loop by ‘meta_value’?
- Add inline HTML to posts published within last 24hrs
- Move posts to top of WP_Query if in certain Taxonomy?
- Ajax Infinite Scroll In Custom WP_Query Loop Not Working
- Display different number of posts from one category on the different pages
- Pagination not working Search posts
- Injecting content with $wp_query->current_post restarts from zero on paged pages. How to inject content after X posts, regardless of pagination?
- Can certain (site-crashing) limitations on WP_Query in shortcode be overcome?
- wordpress query in header won’t reset and corrupts other loops
- Implementing an OR statement to wordpress wp_query
- Get List of all the Authors
- Create ONE callback for all page templates, post filter queries + paginated pages, triggering pagination via AJAX
- WP_Query loop within WP_Query loop
- Refine search results using WP_Query
- How to pass many ids in post__in?
- How to use WP_Query to display many posts?
- How to show subcategories using loop?
- Sub-loop / nested loops Best Practices
- Five posts from a category in footer
- Show Sticky Post at the top but do not show again in the loop?
- Any number in meta key (wp query)
- How do I run through a WordPress loop called from a filter function?
- How do I get the title of a category in a custom loop?
- Using the_post_thumbnail resets current loop item ID
- Order by empty custom field
- Out Of memory issue on post per page parameter
- Check if loop has any categories?
- WordPress query with items from more than one selfdefined taxonomy as `term` argument
- Get all fields inlcuding “ACF” (Advanced Custom Fields) columns in wp_query
- New WP_Query loop in admin causes problems
- Need to convert string of term ids into comma separated integers for use in an arguments array
- Change query from cat id to slug or name?
- How do I get my custom query to work with search results after the first page?
- Using Wp_Query without the loop?
- Issue with front page navigation after upgrading to 3.4
- Custom WP_Query id
- Assign custom parameter to each post in query
- Exclude recently updated post from custom WP_Query using multiple loops
- get_posts output always same post
- difference between querying database and using the loop
- Stomping WP_Query in author archive to facilitate pagination with custom queries
- How to make posts unqueryable/unpublish posts where ACF relationship field is an unpublished post? [closed]
- Loop increase in while loop not working
- posts archive page – closing WP_Query loop correctly [closed]
- has_excerpt() not working inside wp_query
- AJAX Breaking Offset Argument In WP Query
- Continue or break the while loop
- Loop posts based on permalink term
- Save (and exclude) posts from loop to use in another loop on page
- Get all posts with empty meta_value
- Check if a post has term inside loop
- How to Order By Two Custom Fields?
- Display specific page (that is child) content on parent page
- Does putting queries within loops cause an issue on WordPress?
- Function using get_posts() with tax_query not working when called from functions.php
- Query Not working as expected
- Paginate pages with dynamic query
- WP_Query loop doen’t work with my custom taxonomy
- How to make the ‘request’ filter work?
- Populate select list with meta values from all posts of a Custom Post Type
- show most viewed post
- How do I stop the same post showing multiple times in a archive?
- how to get custom attachment url?
- How can I use WP_Query to sort ‘event’ custom post type by date?
- Display posts side by side with custom query
- WP_Query & Duplicate entries
- WordPress For Loop Prints Unwanted Extra Paragraph Element
- Calling a function with WP_Query only ever brings the first result
- query_posts() doesn’t seem to be called in my page
- Pagination returns 404 after page 20
- Ordering Posts by parent category, name ascending
- WP_Query a custom field value bringing back 0 results
- Set Transient on CPT
- Create multiple sections for all categories and then queries all the posts for each of those categories
- Multiple wp_query loops showing first 5 posts on all pages instead of older posts[Resolved]
- Next / previous posts link doesn’t show up with Posts 2 Posts
- meta_query dates from an array
- Creating array to compare custom field values
- $query conflicting with other queries in the same page
- Carousel Loop only duplicating
- Remove 5 latest posts from the loop
- Exclude post formats in custom loop
- How to show featured post first, then separate loop for other posts
- Show linked products using wp query and woocommerce
- Standard Loop – wp_query
- Custom Wp_query loop takes very long
- Show number of posts AND number on current page (cannot make it work)