The reason is you are visiting the home page and it contains the WordPress Loop like below to query 10 recent posts.
<?php
if ( have_posts() ) :
while ( have_posts() ) : the_post();
// Your loop code
endwhile;
else :
// not found template
endif;
?>
The number of posts can be managed from settings->reading->Blog pages show at most.
from WordPress dashboard.
There you will see 10 posts
selected in the value. if you want to display 5 posts then change this value.
if you want to remove this query from home page then edit index.php, frontpage.php or home.php
file depending upon your theme. Recommended way is to create a page template
and do your thing there. how to create page template in WordPress
Related Posts:
- get_results using wpdb
- Count & Display Database Queries
- Export wordpress table to excel
- How best to inject ads between posts in the loop?
- Change SQL get_results to search for posts with custom term in custom taxonomy
- Change all http to https in mysql databse?
- WooCommerce – Query for ordered products
- PHP variable in WordPress database query
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- Query WordPress database by registered date and role
- Query from a different database than the default
- How to query the WordPress database to get posts of a certain custom post type, taxonomy and field?
- Select Multiple meta_value from WP DB; Single Query
- CRUD operations using WordPress database API
- Hook directly into query execution
- Advanced SELECT query with condtional statements
- Select two sums with single get_var statement
- Replace/Mute/Stop Search Query
- Slow queries constantly getting stuck on WordPress database of ~100,000 posts
- cache specific data?
- How Can I Put Meta_Compare in the Database-Query?
- How to paginate information obtained from a query to a custom table?
- Historic WordPress database connection
- Check if an option exists and get its value in one hit
- Query multiple tables at once?
- $wpdb->query can’t insert data
- Custom WordPress Table wpdb
- Best practice to limit results in get_row()?
- How to display content from external db with relevant urls
- Connecting to a different database
- SQL query to set posts in bulk based on the post content
- Query Column of Specific ID from Database Table
- Custom search query by category id
- How to display data from db in select list [closed]
- How can I query the db to access current post information?
- Compare User meta_value with Product meta_value
- How to insert a value to decimal type field using wpdb->prepare?
- Join Query on WP_USERMETA Table
- Insert NULL value using prepare()
- Job and Employee Performance Tracking with Product Safety
- WordPress Database Query works in phpMyAdmin but not in the code
- wpdb query to insert images in to post/page gallery
- Set SQL_BIG_SELECTS and MAX_JOIN_SIZE on a WP_Query
- Performance bug – slow DB query
- How to optimise this database query?
- How can we speed up wp_get_nav_menu_items()?
- Extracted CSV as Array for Custom Query Loop
- Should I Use only wpdb Class to Write Custom Queries?
- Generating an HTML table from an array based on dynamic key values
- Pulling values from a sepcific row in table
- Using class id from array for query
- database search feature
- SQL Query to get post_id from wp_posts and and meta_key(s) from wp_postmeta
- SQL query to rewrite all media URLs to end with .webp
- How do I find users by password?
- Exclude Statement in SQL
- Can a post ID be 0?
- Issue with wp_insert_post and post_content field error Could not update post in the database
- wp_posts – guid update
- what is the wp_5_posts table in the database?
- Migrating data between local and development server
- WordPress Database Charset/Collate
- What is the database table for pages?
- Using Dynamic Data Pulled from a MySQL Table in a WordPress Page
- Is database safe after merging a branch of a more recent version over an older one?
- Hook to be used when creating a database table
- Delete all post meta except featured image
- Where is custom template file chosen for a post stored in the DB?
- Safe way to find last inserted id in a table?
- Is it possible to split database tables using HyperDB?
- Show content from database
- “Error establishing a database” connection on some sites
- change wp user status from wp_users table
- Is MariaDB’s Aria storage engine suitable for WordPress?
- Difficulty importing my live site to local
- WordPress running SQL query to update database from form
- How to fix database error duplicate entry
- WPDB SQL query with prepare() returning variable, not db value
- Get value form wordpress database
- Why this query is not showing any result on wordpresss home page?
- Is there an easy way of exporting posts with their category already asigned and pictures from localhost?
- Connect to another WP install and grab post based on custom field
- Adding prefix to WordPress database tables breaks admin capabilities?
- What is the best way to resurrect and update my old WordPress site?
- content disappearing minutes after it’s published
- What is the most efficient way to reset a WordPress site?
- Add pdf to a website
- Optimizing function that automatically creates internal links based on post title string
- Can two domains use the same database?
- _wp_attachment_metadata is not being added to database when PDF files uploaded
- adding user_id and name to a separate table whenever a user register based on role
- How do I loop/iterate through posts to edit all img tags?
- How to edit posts/pages without making the change live?
- How to retrieve user data based on role using SQL?
- Adding featured for post using database
- Store id from database query in cookie
- Split database on large site?
- Store the wordpress “featured image” under »wp_posts« Database table
- What WordPress file is saving new users to database
- wordpress database error