The way you are thinking wordpress is, is not like that. You can’t find the query and alter it like you do in plain PHP. There are filters and actions and a whole architecture to play with pages and posts. I suggest you to read wordpress documentation and Codex.
If you are a programmer then have understanding with PHP and little bit of database then you will be amazed to see the architecture of wordpress.
Suggested Reading:
Related Posts:
- Why won’t pagination work?
- WordPress Query Posts From Category Post on Static Page
- How to create a page that shows the last 10 posts?
- Export all posts to import as product items
- Direct some posts to only appear on a specific page
- Prevent duplicate pages from being added
- Separate blog and reviews categories
- Create a List of Widgets, where each widget holds three attributes
- Change published date and time using SQL query for page in every 5 hour
- WordPress empty page! what is wrong with this code?
- Bulk find & replace on WordPress posts/pages (minus image paths)
- Count posts for pagination
- Multiple Pages – Seperate blogs
- How to run select query of post with category and tags?
- Special Query: Title, Terms, Content – %LIKE%
- Need to show birthday of custom post type(Famous people in this case) in elementor. Date of birth set in custom fields
- Change permalinks in posts via SQL
- Batch Scanning and Deleting Empty WordPress Posts
- Get the Current Page Number
- Stop WP from creating “Sample Page” and “Hello World!” post
- How to display by default only published posts/pages in the admin area?
- Using $wpdb to query posts with meta value containing current post_id
- Query posts from current year
- Display posts by tag on page
- how to get permalink using sql
- how to display full post with pagination on home page
- Can I change a post to a page by changing it’s type?
- Add a custom option to a page in backend
- Order post by year DESC and month ASC
- Showing random content / pictures from earlier posts in a sticky post?
- Creating new page with pre-defined parent page
- How can I display a specific user’s first published post?
- Populating a page with content from post custom fields
- [Plugin: Posts 2 Posts] How does it work?
- How to show a full post, not just an excerpt
- disable column on post and user list
- Can a page_id and a post_id be same?
- How can I display widget in a Page or Post?
- Differentiate between posts and pages in search results
- Getting a 404 error when clicking edit page
- Blog Posts not showing title
- Get posts by name and taxonomy term
- Get Posts that are in the current month or later
- Get Meta Key Value While Saving Post
- Displaying Latest Posts on a Page
- How to make number of blog posts a custom field?
- How can i display gallery shortcode output under Post text
- How to verify wp user password by sql query in wp? [closed]
- Get ALL post ID’s export list (Only id’s. Php or sql not important )
- Get Page ID of blog homepage
- When open add new post or page WordPress add post with ID=0 continuously [closed]
- How do I do a page break?
- Automatically create a new page daily with last three posts
- When changing pages to posts, how do you set up 301 redirects for the page URLs?
- How to get ID of the page included with get_page()?
- First x post with another template then the others
- Delete all drafts?
- Wrap every month posts in div
- static landing page leading to author specific pages w/ “live” content
- Display post by click on the link
- WordPress 302 Redirect to Random Product/Post/Page
- Queries take 120+ seconds on my large WordPress site
- Display Featured Posts Grid on Static Page (Gazette)
- WordPress loop not working on static front page
- Sidebar on single.php not showing up
- How to display only one category in a custom post type?
- How can I get posts from 9/13/11 to today with SQL? [closed]
- Adding if statement into the_content()
- Anyone know a php snippet for showing the first 200 characters of the most recent post?
- Different post views for different category views
- Creating a redirect option for current page url
- Indenting within a blockquote
- SQL DELETE multiple post_meta on single and multi-sites
- WordPress Sticky Post Count “Fix” Breaking Pagecount by 72 pages!
- How to add a block to a category page?
- filter posts based on menu_order
- I need some explanation on global $post [duplicate]
- Using WP page password protection as defacto login
- Adding wordpress posts using phpmyadmin
- calling pages instead of posts
- WordPress display page information rather than post
- Post Category link is same with Page link
- How to delete all posts with dead image urls?
- Querying posts from current category, using a variable as array argument
- Precedence of page permalinks over woocommerce product category links?
- wp query custom orderby not custom field
- Query post by meta key of another table
- Page and Posts loading as index page? Not loading the content
- Query post category & remove any post id
- Converting Posts to Pages
- 404 error on every post and page other than home
- Get post title of faulty link on 404 error page
- The next_posts_link() works only with original $wp_query
- How to limit post query to only return a total count of items with certain post statuses?
- Limit amount of pages shown in pagination within wp_query
- How to make posts appear under pages
- When and how will php code in a user made WordPress page be executed?
- Post data returning null [closed]
- Display posts with id equal to relationship value
- Sort Posts Alphabetically Based on Specific Category (Divi)