have_posts()
iterates over all posts found and actually returned in the query which depend in the posts_per_page
parameter.
And for your second question, using query_posts()
does overwrite the query and its not really the recommend method to alter or modify the query result, here is a nice question that explains better ways : When should you use WP_Query vs query_posts() vs get_posts()?
Related Posts:
- how to display full post with pagination on home page
- How do I change the gallery that is inserted in the post?
- Convert a complex webpage into WP theme
- Why orderby=”date” does not support manually changed posts?
- page.php showing loop of posts and not page content
- How to show single post page as home page
- Exclude category from
- Blog page not working
- Highlight static blog page link in header
- Block editors annoying warnings
- how to handle the loop using filling bootstrap grid structure?
- Cant’ Grab WordPress Built-in Posts Through Loop
- How do I allow certain users to make a certain type of post?
- I can’t find the relevant part of the loop in my theme file. How do I find the full content with “More…”
- Moved a website and excerpts don’t work for old posts
- Display post order ranking within wordpress loop
- Can the_post_navigation() be outside of the loop?
- Post are not showing up
- How to show the posts list into a static page? Problems to use the loop into a static page
- The post order is different for logged-in and non-logged-in users? [closed]
- How to show only the date, the title and a little “summary” of my WordPress post in my custom theme?
- Get posts after calculating meta key
- Is there a block to print post link standalone in a block theme?
- WordPress Ajax load doesn’t work
- Show posts assigned to multiple categories in current category page
- Pausing and Resuming WP_Query results
- Pulling in post category and children within category
- Unable to restore from backup – how to obtain old blog posts?
- Post Loop Missing Most Recent Post
- Trying to use AngularJS with WordPress without any API
- How to : pagination in 3 different custom loops on the same page
- Pagination with an array of post objects?
- Sharing post from archive page (loop) doesn’t work
- How to change the color theme per post?
- Get Image tag from content of post
- Start WP Pagination From Number 1 in URL
- Echo all category names, apart from one
- Disable sticky option for specific categories
- How to add tags (custom taxonomy) to post class css?
- List authors with the last post title and order by last post date
- Listing Specific Categories from Current Post with Depth
- How to exclude visited posts from loop
- Use two different post_per_page limits with infinite scroll
- wp_query random post
- How to make the first post in the loop be styled like a “new / featured” post?
- “Right Way” to make custom Loop respect reading settings inside admin panel?
- How to setup a query to output posts by groups of five?
- Only display sticky post or latest post in custom loop
- how to get the post attachement image in full size?
- How to order posts in an arbitrary order?
- How to create a template for Pages?
- How do I stop the loop from repeating in my category template?
- Remove Content after
- get_the_category listing in hierarchial order
- How do I do a page break?
- How many posts does the loop return?
- Display Posts on Custom Page
- How to make a sum of all posts displayed in a loop
- Shortcodes on my website stops working after theme update [closed]
- Possible to alternate between two loops
- Exclude current custom post on single post
- Wrong post title displayed from loop
- Get Value of Post before
- why does wordpress ignore the post args?
- Multiple Loops Breaking Pages
- add to end of post in the loop with plugin
- Why am I getting a different filename? And how does WordPress load singular.php for both Page & Post? (Fresh WordPress installation)
- First x post with another template then the others
- Loop doesn’t show title of second post and posts thereafter
- Change all author links in Blog roll
- WordPress website loads more posts than expected
- Grid post page on WordPress with Bootstrap, the_excerpt(); Problem
- Showing categories and subcategories with posts
- Second get_permalink inside loop points to wrong URL
- Get the amount of posts on a current page
- Loop parent terms {display posts} AND loop child terms {display posts}
- What does WordPress do if I save a post without content/title? [duplicate]
- How to add a class to each individual post?
- add bootstrap post slider with tabs
- How to add a class to edit_post_link?
- How to add add more properties to WP_Post object in search results loop
- Custom taxonomy archive page problem
- What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?
- Admin – no Featured image choice in create new/page|post
- Change image size depending on page
- Why in my theme I can’t see all the statics content under the posts?
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- Loop don’t work within single.php page
- Use Click Image to Play Youtube Video in a WordPress Loop
- older blog posts not showing in new theme
- How to get posts published on the latest date?
- The_excerpt() doesn’t parse – how to change that?
- Trying to edit archive.php to only show post extract, with featured image
- Add Blog to WP homepage Manually
- How can I use the WordPress Loop and Pagination in multiple instances but different scenarios throughout my site?
- How can I remove the first two words and shorten get_the_title()
- WP_Query with custom post type ID
- How to only publish posts with image in it
- How to show all posts by author on buddypress profile with navigation
- Page and post loop same template