How to Find the Page the Front Page is Using?

I use WordPress theme Shiny. I had someone else do my site and now I am trying to figure out how to edit the homepage. The theme version is version 1.0.2.

How can I edit my homepage?

Related posts

Leave a Reply

3 comments

  1. Maybe that is unrelated to your theme. WordPress has an option to set a static page as front page. To find that page go to Settings/Reading and see if such a page was set:

    enter image description here

    In this example the page name is Sample Page. If there is no static page set, you have to look through the theme options. Unfortunately, some theme authors rcreate native functions like that …

    Now go to Pages and find that page:

    enter image description here

    You can edit it by clicking the edit link.

  2. If you are trying to determine which template is being used when WordPress renders your front page, try this:

    1. Create a PHP file called something like wordpress_debug_template_file.php and place it in same directory as functions.php and add:

      <?php
      
      add_action('wp_head', 'show_template');
      
      function show_template() {
          global $template;
          print_r($template);
      }
      
      ?>
      
    2. Next, add the following to your functions.php file before the ending ?>:

      //Loads the template debugger
      require_once('wordpress_debug_template_file.php');
      

    This will print the absolute path to the actual template file being used on all pages at the top of each page.

    Just comment out the require_once line to turn it off.

    Hope this helps!

  3. You can check out the current front page with the following code:

    /* Get the current front page. */
    $front_page = get_page(get_option('page_on_front'));
    echo $front_page->post_title;
    

    You can set a new front page by a page ID number, if you know it.

    /* Set a new front page with a page id number. */
    $page_id = '6';
    update_option('page_on_front', $page_id);
    

    If you don’t know how to get the page ID number, don’t worry about it. You can still set a front page with the title of your desired page.

    /* Set a new front page with a page title */
    update_option('page_on_front', get_page_by_title('Your Crazy Page Title'));