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?
- How to fix pagination for custom loops?
- Counting the posts of a custom WordPress loop (WP_Query)?
- Get excerpt using get_the_excerpt outside a loop
- How to display Yoast SEO meta description in archive template for each post instead of the_excerpt()? [closed]
- Get post content from outside the loop
- Why should I put if(have_posts()), is while(have_posts()) not enough?
- Display featured products through custom loop in woocommerce on template page
- Split Content and Gallery
- How to get Author ID outside the loop
- How can i display the content in plaintext
- Redirect loop when trying to login to /wp-admin/ [duplicate]
- How to split a loop into multiple columns
- Is there any difference between the_title() and echo get_the_title()?
- AJAX with loop filtering categories
- WP_Query vs get_posts
- Do I need to use The Loop on pages?
- Remove the Homepage Query
- Is it possible to define a template for a custom post type within a plugin independent of the active theme?
- remove tags from the_content
- the_title() shows title of the first post instead of the page title?
- How to force excerpts / teasers in the loop
- Retrieve each widget separately from a sidebar
- Why am I being limited to ten posts on a custom loop?
- Ways to have multiple front-page.php templates that can be swapped out?
- Should I use loop in the single.php file?
- A search for ‘0’ returns results
- How to return results of a get_posts() in explicitly defined order