WP determines template file by following Template Hierarchy. The process has quite a few steps between URL and resulting PHP file loaded, so generally one is not a reliable indication of the other.
Outside of looking through likely template files (good enough in a simple theme) you can try dumping this with code in template_include
filter or using some debug plugin. For example Query Monitor shows main template file loaded.
Note that in more complicated theme (especially private ones) the actual PHP file might be deeply nested/included from the initial template file.
Related Posts:
- Why have on every line
- Function to return true if current page has child pages
- Include a external PHP file into a WordPress Custom Template
- List of all theme customizer control types?
- Get author full name
- How to remove hardcoded characters from playlists?
- is there a simple way to list every templates / php files used to generate a specific page?
- Set the transport of the Customizer ‘header_image’ core setting to ‘postMessage’
- Widgets not showing in my custom theme
- Why WordPress architecture is not pure object oriented and it don’t use MVC pattern? [closed]
- Displaying theme options in css
- Customizer: Output default value in Customizer CSS
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- Converting HTML Template to WordPress Theme
- Customizer: active_callback and sanitize_callback incompatibility?
- Menu jumping when calling it via PHP
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- How to obtain the current website URL in my theme?
- What exactly do this function declared into functions.php file of a WP theme?
- Underscore – Self hosted fonts
- What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?
- Is there a hack for using is_page() within the function.php file?
- pass html code to worpdress
- How can I customize a WordPress theme before it’s downloaded?
- Where can I find the declaration of `$_wp_theme_features`?
- Display tab title as ‘blog tagline | blog title’
- A Customizer checkbox control that sets the setting to “” or to “blank” and show() or hide() a color control
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- How to add button to top of theme customizer?
- WordPress and event-driven programming – what is it about?
- Conditionally loading JavaScript based on the Advanced Custom Fields in the post
- reason of splitting theme files to multiple files
- Admin Bar (Toolbar) not showing on custom PHP file that loads WordPress
- Limit the Excerpt field in WP-Admin in words
- Use different javascript files for each page on website
- How to get custom image size for image uploaded in Customizer
- Custom category code not showing all posts
- Random Default Avatar Function
- Adding country tags automatically
- How do I get current page ID in WordPress customizer file?
- WordPress does not load page.php, return 404.php
- Taxonomy linked to pages
- Add child pages of parent to navbar PHP
- Load a page into a div with Ajax
- How to use my style.css file outside of wordpress subdomain?
- How to remove the cufon script from Dzonia Lite theme [closed]
- Can I install/embed WordPress on a ‘single page’?
- Add_action not working in required file of functions.php
- How to set up VS Code for WP plugin/theme development in 2021? [closed]
- Improve page speed loading using CDN and async or defer attribute
- Populate editor with some content of a page with a page template
- Displaying recent posts on static page with template-part via shortcode
- Using $wpdb (WPDB class) ‘replace’ with multiple WHERE criteria problem
- Skt full width basic slideshow problem
- get_template_part for specific page
- How do I create my own .php file with a code part and echo it on different pages?
- get_template_part() not firing within a switch statement when template has new WP_Query
- How to call multiple functions from multiple files into a WordPress page template [closed]
- Display Youtube Time Automate from Key
- How to fix this PHP warning in WP-Admin after upgrading to 3.1.2?
- What is the best way to define constant options for a theme?
- Warning: printf(): Too few arguments in helpers.php file
- Where is the PHP code generating an element?
- Basic wpdb update question
- WordPress widget and customize.php not working in Ubuntu16.04 VPS
- Help Fallback (thumbnail)
- How do i wrap woocomerce attribute in list?
- save metabox with new values _wp_page_template
- Show different website layout if no sidebar added
- Need advice on theme customizer and child themes
- How to make sure relative URL works when site is not on root domain?
- Create condition for Author bio Social Links
- PHP inside echo HTML
- Woocommerce template file outputting tags
- Trying to update Woocommerce meta values
- Check if current post in loop is last on current page
- How to change PHP variables with AJAX request in WordPress
- If Statement is Ignored?
- REST API custom endpoint to fetch pages and posts not working
- Exclude category from woocommerce product category list
- Create “blank” admin page without having admin-bar/admin-menu for faster load
- Create Schema in WordPress with PHP
- Fix hover images blink
- How to add Open/Close Toggle button into Twenty Fifteen theme for hiding left sidebar?
- Use Custiomizer to setup meta theme color tag
- Is there a way to have chunks of a page’s content expire?
- Static home page ignored
- How do I routinely extract the thumbnail of the most recent post?
- Click to expand menu
- Showing the project type in HREF
- Showing custom field contents without listing description
- Check if values exists DB
- Pagination on Custom Loop
- WP multisite network plugin fails to see classes loaded with spl autoload
- MySQL Engine vs. Charset
- Select area and checkbox data is not saving?
- In reading settings posts are set to “blog” and I have page-blog.php but no posts
- Headers already sent error with get_template_part in REST API call
- Add multiple HTML attributes to an Elementor button