The Loop just outputs what is contained in the Main Query, it doesn’t fetch any posts on its own. The Main Query is empty on a 404, so there’s nothing for The Loop to output.
If you want additional content, you have to query for it yourself:
$query = new WP_Query( array('posts_per_page' => 10) );
if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();
get_template_part('content','home');
endwhile; endif;
Related Posts:
- Jquery Slider for profile template
- if ( is_home() && ! is_front_page() )
- Is it necessary to reset the query after using get_posts()?
- Is including the loop necessary for page.php? [duplicate]
- What is best way passing variables to theme templates and using them different places like widgets?
- Post Loop not Returning Permalink
- Get posts that matches specific terms of multiple custom taxonomies
- Page template not displaying
- Is get_posts() more efficient than The Loop?
- Loop through pages with specific template
- How to get_template_part using AJAX?
- wp alchemy multiple image uploader output images to template
- How to get_posts where ‘menu_order’ is more than 0/zero?
- code suddenly appearing from my tempate second loop
- Display the_content on click jquery
- What is the maximum number of posts a WordPress loop can work with?
- Why only one post (and no pagination) on this variation of the loop?
- Get search.php results in header.php?
- Sort posts by most recently modified
- WordPress Loop inside Loop?
- A smarter way to display multiple loops inside a page template
- Template structure
- How to show “teaser” posts on blog / archive pages, otherwise full posts
- Order archive results by post id in custom taxonomy template
- Get all posts including sticky ones with get_posts(),setup_postdata(), and foreach loop?
- Default ‘post’ post type archive slug?
- Show all posts using the template page and the loop?
- Showing sticky posts with get_posts()
- query_posts() vs get_posts() multiple loops [duplicate]
- How do I paginate a get_posts() request inside another page loop (Paginating childpages)
- How do I make a variable available inside partials?
- Both a page loop and posts loop on the same page
- How to get The Loop working with $wpdb->get_results()
- Multiple get_posts() queries on one page
- Output meta into arrays
- Get post offset/posts page offset in single post page (outside the loop)
- Second Loop Showing Only One Post on Single Post Page
- How do I put my frontpage featured image in a page template for home.php?
- get_posts() forcing ignore sticky posts on main loop
- Get markup for post without loading into the template
- How to render the single post template with the post name?
- excerpt not showing up
- new custom theme – posts displaying on top of one another
- How do i create a list-posts-page?
- loop inside a loop : search for posts in the same category
- How to sort a loop after most viewed
- How to loop specific Category menu from archive page?
- How do I set the Stewart Search Template to return only published posts in the result
- Is it possible to set archive.php instead of index.php to display blog?
- Using is_page_template inside loop
- php loop error for count posts in category
- is it bad to copy the loop for a template?
- Is “the loop” a template tag?
- Deeply Nested Menu Loop with Twig using Timber [closed]
- WordPress with woocommerce custom query
- Alternative layout the loop
- Cant pull in featured Image
- numberposts not responding to wp_reset_postdata()
- Template included with plugin doesn’t return all posts for custom taxonomy
- Creating a archive for taxonomy terms, not the term results
- Secondary loop cuts off at 10 posts?
- Need a conditional to test if title of parent page matches title of child page
- get_posts and wp_autop (remove filter)
- Need some help with “the_widget()” function
- Is there a way to target only images within the loop?
- get all page templates
- Show last post from multiple categories using wp_list_categories
- Load featured article once in a loop
- wordpress showing all posts instead of date range
- How to implement template file and the loop
- Question about custom plugin
- Same posts within a paginated page
- How can I create an entirely new, separate display of posts?
- Should I use loop in the single.php file?
- get_the_foo() in the loop – does it perform another query?
- Exclude filter on front page
- Check if date of post is yesterday
- Exclude first 2 posts with meta_key from loop
- Make a custom loop inside single.php with pagination
- Why do I get `Call to a member function have_posts() on a non-object `? [closed]
- How to split a loop into two columns
- Get single post from tags array
- Latest Post Styled Different Than other Posts
- Woocommerce: How to display product price [closed]
- Make loop alphabetical
- How to check if a product is purchased within the last 365 days before displaying something
- How do I get my loop.php to properly paginate?
- Where to add offset?
- List ALL posts by author on author archive
- Can’t limit posts_per_page in loop
- Slug is changing when I use WP_Query in a metabox of a post
- Can’t print out returned value
- change the_content images for different sizes (Desktop, tablet, mobile)?
- WordPress Group By Problem
- Home page loop with pagination problem
- WooCommerce custom loop pagination on front page
- Eliminate duplicates in a foreach loop [closed]
- I want the first post on my home page to be lengthier than the rest (example included)
- Loop with Custom Post Type Taxonomies and Interstitial Code
- How can you make it so the comment box shows on some pages or posts but not all?