Skip to content

How to Find Which Page Your WordPress Front Page Is Using (Easy Guide)

By ali 9 min read

WordPress Reading Settings showing how to identify the page used as the website homepage

Have you ever opened a WordPress website and wondered which page is actually being used as the homepage?

This situation is common when someone else has developed the website or when you are working with an unfamiliar WordPress theme. You open the Pages section, edit a page, and nothing changes on the homepage.

The reason may be that WordPress is displaying your latest blog posts instead of a static page, or your theme is controlling the homepage layout through a template file.

In this guide, you’ll learn how to identify the page or template being used for your WordPress front page. We’ll cover the dashboard settings, theme files, and PHP methods you can use to find the exact page.

First, Understand How the WordPress Homepage Works

WordPress provides two main options for displaying your website’s front page:

  1. Your latest posts: WordPress automatically displays your latest blog posts on the homepage.
  2. A static page: You select a specific WordPress page to use as your homepage.

Before editing anything, you need to find out which option your website is using.

You can learn more about these options in the official WordPress Reading Settings documentation.

Method 1: Check the Reading Settings in WordPress

This is the easiest and most reliable way to find out whether your homepage is a static page or a list of recent posts.

Follow these steps:

  1. Log in to your WordPress dashboard.
  2. Navigate to Settings → Reading.
  3. Find the Your homepage displays option.
  4. Check which option is selected.

You’ll see one of the following settings.

Option 1: A Static Page Is Selected

If A static page is selected, WordPress uses the page chosen in the Homepage dropdown as your website’s front page.

For example:

  • Homepage: Home
  • Posts page: Blog

In this example, the Home page is your website’s front page.

To edit it:

  1. Go to Pages → All Pages.
  2. Find the page selected in the Homepage dropdown.
  3. Click Edit.
  4. Make your changes and update the page.

Important: The Posts page is different from the Homepage. If you have selected a separate Blog page, WordPress uses it to display your blog posts. Editing that page’s content may not change the actual blog listing.

Option 2: Your Latest Posts Is Selected

If Your latest posts is selected, WordPress displays your recent blog posts on the front page instead of using a specific static page.

In this situation, there may not be a dedicated homepage page to edit under Pages → All Pages.

The appearance is generally controlled by your active theme’s templates and settings.

For a classic WordPress theme, check these template files:

  • front-page.php
  • home.php
  • index.php

These files do not all have the same priority. If front-page.php exists, WordPress uses it for the front page. Otherwise, the template hierarchy determines which file is used.

For a block theme, look for templates such as front-page.html, home.html, and index.html.

You can read more about this in the official WordPress Theme Template Hierarchy documentation.

What If No Static Homepage Is Selected?

If your website uses the latest posts option, or the homepage does not look like any page in the Pages section, check your theme configuration.

Depending on your theme, you may find homepage controls in:

  • Appearance → Customize
  • Appearance → Editor (for block themes)
  • A theme-specific options panel
  • A page builder or theme homepage builder

Some themes provide their own homepage sections, sliders, featured content, and layout settings. In that case, changing a regular WordPress page may not affect the homepage design.

If you are unfamiliar with the active theme’s files and development tools, this guide may also help: WordPress Theme and Plugin Development Software.

Method 2: Find the Exact Template File Used by WordPress

If you want to identify the PHP template file responsible for displaying the front page, you can use a small debugging snippet.

In a classic theme, WordPress makes the selected template file available through the global $template variable.

You can temporarily add the following code to your theme’s functions.php file or a site-specific plugin:

add_action( 'wp_footer', function () {

    // Show the information only to administrators.
    if ( ! current_user_can( 'manage_options' ) ) {
        return;
    }

    global $template;

    if ( ! empty( $template ) ) {
        echo '<!-- Active template: '
            . esc_html( wp_basename( $template ) )
            . ' -->';
    }
} );

Now follow these steps:

  1. Save the code.
  2. Log in as a WordPress administrator.
  3. Open your website’s homepage.
  4. View the page source in your browser.
  5. Search for Active template.

You may find a comment similar to:

<!-- Active template: front-page.php -->

This tells you which PHP template file WordPress selected for that request.

Security note: The example displays the information only to administrators and does not print the server’s full filesystem path. Remove the debugging code after testing.

This method is intended for classic PHP themes. Block themes use HTML templates, so the PHP template variable does not identify the active block template in the same way.

Method 3: Get the Front Page ID and Title Using PHP

You can also use WordPress functions to find the page selected as your static front page.

WordPress stores the selected page ID in the page_on_front option. The show_on_front option tells you whether the website is configured to display a static page or the latest posts.

Use the following code:

<?php

if ( 'page' === get_option( 'show_on_front' ) ) {

    $front_page_id = (int) get_option( 'page_on_front' );
    $front_page    = get_post( $front_page_id );

    if ( $front_page instanceof WP_Post ) {
        echo esc_html( $front_page->post_title );
    } else {
        echo 'The selected front page could not be found.';
    }

} else {

    echo 'Your latest posts are displayed on the homepage.';

}

If a static page is selected, the code displays its title. Otherwise, it tells you that the homepage is configured to display the latest posts.

This is useful when you need to identify the homepage programmatically in a theme or plugin.

For more information, see the official WordPress reference for get_post() and get_option().

How to Change the WordPress Homepage Using PHP

If you want to assign a different page as the homepage, you can update the WordPress options programmatically.

Remember that changing only the page_on_front option is not enough. You should also set show_on_front to page so WordPress knows to display a static page.

Option 1: Set the Homepage Using a Page ID

Every WordPress page has a unique ID. If you know the ID of the page you want to use as your homepage, you can use:

<?php

$homepage_id = 6;

update_option( 'show_on_front', 'page' );
update_option( 'page_on_front', $homepage_id );

Replace 6 with the actual ID of your page.

Option 2: Set the Homepage Using a Page Slug

If you know the page slug instead of its ID, use get_page_by_path() to retrieve the page.

For example, if your homepage page has the slug home, use:

<?php

$homepage = get_page_by_path( 'home' );

if ( $homepage instanceof WP_Post ) {

    update_option( 'show_on_front', 'page' );
    update_option( 'page_on_front', $homepage->ID );

}

This code finds the page using its slug and assigns it as the static homepage.

See the official WordPress reference for get_page_by_path() for more details.

Important: These are one-time configuration examples. Run them in a controlled administrative context, confirm that the intended page exists, and remove the code after it has executed successfully. Do not leave these update_option() calls running on every website request through your theme’s functions.php file.

Simple Method for Beginners

If you are not comfortable working with PHP or theme files, you can find and change your homepage directly from the WordPress dashboard.

  1. Go to Settings → Reading.
  2. Check the Your homepage displays setting.
  3. If a static page is selected, note the page name.
  4. Open Pages → All Pages.
  5. Find and edit the selected homepage.

If the latest posts option is selected, check your theme’s homepage template or site editor instead.

Common Mistakes When Finding the WordPress Homepage

Here are some mistakes that can make it difficult to identify the correct homepage:

  • Editing the wrong page: The page you are editing may not be selected as the static homepage.
  • Confusing the Homepage with the Posts page: These are separate settings when using a static homepage.
  • Ignoring theme templates: The theme may use front-page.php or another template to control the layout.
  • Forgetting about page builders: A builder or theme options panel may control parts of the homepage.
  • Changing only the page ID option: A static homepage also requires show_on_front to be set to page.
  • Leaving debugging code active: Remove temporary diagnostic code after identifying the template.

If you are building custom functionality for your website, you may also find this tutorial useful: How to Create a Custom Plugin in WordPress.

Frequently Asked Questions

How do I find which page is set as my WordPress homepage?

Go to Settings → Reading and check the Homepage dropdown under A static page. The selected page is your website’s static front page.

Why can’t I find my homepage under Pages → All Pages?

Your website may be displaying the latest posts instead of a static page. Alternatively, the active theme may be controlling the homepage through its templates or site editor.

Which WordPress template file controls the homepage?

For a classic theme, front-page.php takes priority when it exists. Otherwise, WordPress follows the template hierarchy based on your Reading Settings. Common fallback files include home.php, page.php, and index.php, depending on the configuration.

What is the difference between front-page.php and home.php?

front-page.php controls the site’s front page when the file exists, whether the website displays latest posts or a static page. home.php controls the blog posts index. When a static homepage and a separate Posts page are configured, home.php is used for that Posts page if available.

Can I find the homepage page ID using PHP?

Yes. Use get_option( 'page_on_front' ) to retrieve the selected static front page ID. Check get_option( 'show_on_front' ) first to confirm that the website is configured to display a static page.

Can I change my WordPress homepage using code?

Yes. You can update the show_on_front and page_on_front options using update_option(). Make sure you use a valid page ID and run the code only once in a controlled administrative context.

Conclusion

Finding which page your WordPress website uses as its homepage is easier than it may seem.

Start by checking Settings → Reading. If a static page is selected, you can find and edit it under Pages → All Pages. If the latest posts option is selected, investigate the active theme’s templates and homepage settings.

For more advanced troubleshooting, you can use PHP to identify the selected front page ID or inspect the active template file in a classic theme.

Once you know whether your homepage is controlled by a static page, theme template, or site editor, you can make changes in the correct place without wasting time editing unrelated pages.