you have to set “post_per_page” to “-1”. Add this code to your home or index.php.
WP_Query (recommended)
$args = array('posts_per_page' => -1);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) : $the_query->the_post();
the_title();
the_content();
endwhile;
/* Restore original Post Data */
wp_reset_postdata();
} else {
// no posts found
}
query_posts() way
// Args that you pass to loop
$args = array('posts_per_page' => -1);
// The Query
query_posts( $args );
// The Loop
while ( have_posts() ) : the_post();
the_title();
the_content();
endwhile;
// Reset Query
wp_reset_query();
Alternatively you can go to Dashboard -> Settings -> Reading and set maximum posts per page to “1000” or something.
Related Posts:
- Move first half of posts to one parent page, second half to the other page
- Custom home page with full post for first one only
- Inserting an example of the last 3 post on to the homepage
- Include Recent Post in Category
- How to have more post in a page than in your home page
- Keep featured content post in homepage with original order
- Custom Post Types, slug, archive and SEO plugins
- Search Custom Post Type Pages and Custom Fields in 2 Dropdowns?
- Using single.php from plugin folder instead of default template folder
- using wp_update_post on save_post
- WordPress plugin to publish to multiple remote WordPress blogs
- How to disable drafts?
- How can I display 7 posts on the home page, but 9 posts on the subsequent pages?
- how to enable different number of revisions for different blogs when using WPMU?
- Custom Post Type Pagination Doesn’t Work in WordPress 3.4
- Unattaching images from a post
- How to wrap every image in a post with a div?
- Post from front-end only by logged in users, form posts as “posted by:
- Hide parts of the post content on the home page
- Order post by year DESC and month ASC
- Displaying Page Title on index.php
- Allow role to delete posts but block him the wp-admin
- Why does `url_to_postid` return 0 when testing `page_for_posts` Page?
- Using Custom Posts with Metaboxes and Drop-downs
- How to show featured image in custom post type dashboard post page
- Archive Page for Custom Post Type is not Working
- Posts vs. Pages
- Dynamic carousel on individual posts
- How to make the post summary taller?
- Filter Custom Post Type by Category with Ajax
- Static page does not show my posts
- How to add pagination in between post and comments?
- Hiding Draft Post In Admin
- Print all the tags from a custom post type Please
- Display multiple custom taxonomy values on single custom post types page?
- Show posts by a custom post author
- Custom loop pagination links not working
- wp-cli post create & media import issues
- Search results posts_orderby and ID
- Unable to restore from backup – how to obtain old blog posts?
- custom post template file not shown, instead all the time 404.php
- Custom Post Type Rewrite To Include Parent Page(s)
- Thumbnail & Category link aside post
- Custom taxonomy archive page problem
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- Custom Post Type archive
- WordPress custom post type with folder structure in slug
- Getting Duplicate Posts on Home Page with Widget Added Between Posts
- How to add automatically bootstrap 4 order-lg-1 and order-lg-2 classes for columns in foreach loop based on the count?
- How to add convenient buttons for new custom post statuses
- Show custom post with custom categories with specific slug
- Auto delete posts based on content text
- How to call posts under a specific category on static front page?
- Display value of custom field at the beginning of a post
- Optimize CPT-function with a loop
- Add post tags to previously created custom post type
- Post is in descendant category not working in home.php
- How to display only one category in a custom post type?
- How to restore deleted post related with deleted users
- add_rewrite_rule and template redirect not working
- Changing permalink of WordPress
- Hook save_post_cpt not triggered when custom fields are modified
- Turn off display for custom sidebar post widget when on the post it’s displaying
- Why is WordPress showing a blank excerpt for just one of my posts?
- How to bulk Update URLs to new values?
- Pagination Not Working With Custom Post Type Category
- WordPress Pods Custom Post Type – separate Media Upload folder for each custom Post Types
- Hide or remove custom post status
- Put page on Archived statut after end of publication date
- post and page and custom post type
- My posts page is missing the page title
- Show custom post category for single post
- How can change header text in post careate/edit form
- How to get meta data from custom category name
- Add Categories To Custom Post
- Display post on main page with thumbnail
- How do I set content in my pages so that it remains permanent while blog posts are added below?
- how to redirect page after delete post inside a post page?
- Permalink base only for posts
- Difference between modified post and new post
- Creating widget – ask for selecting a post in the admin panel
- issue in wordpress auto delete post and redirect to another 1
- wp query custom orderby not custom field
- Customizing individual images on posts
- Custom Single Post Type not referring to single-post-type.php File
- How to modify specific parts of a post content in WordPress
- Include post on external custom site
- Run Jquery Script after delete post in front end
- 404 error on every post and page other than home
- “Current” class on a singular page menu item with custom post types?
- Successive creation of over 1000 posts causes 404?
- Trying to display stick or featured post on homepage
- How can I allow users (subscribers) to download selected posts into a single PDF? (RESOLVED)
- Choose options via url
- Custom Post Type Pagination 404 Error (if paged>=2) [duplicate]
- Display ONLY Latest Post From Several Categories
- custom post type single page template not working
- Display post structure in function
- Default post type doesn’t display in url
- Notify/check if the content of a custom gutenberg block has changed on save_post