Support » Themes and Templates » [Resolved] Help! Changing homepage to homepage.php

[Resolved] Help! Changing homepage to homepage.php

  • Hello everyone. Somehow my welcome screen totally changed.


    I used to have a welcome video with two columns underneath it in the central body. Now I get a generic welcome page. I have no idea how this happened – it was working fine yesterday.

    It appears to me that somehow the custom-created “homepage.php” is no longer the page loaded as the actual homepage. Where can I change this back? I’m assuming this is my problem, but I don’t know how to make homepage.php the true home page again.

    Thanks in advance for your assistance.

Viewing 15 replies - 1 through 15 (of 18 total)
  • From your wp-admin dashboard, go to Settings->Reading

    Ensure that you have selected the option to display a static page on your homepage.

    Then, ensure that the correct page is selected to display.

    That’s what it is set to now. It’s set to an individual page. What I’m looking for is the original layout which — it appears to me — is coded in homepage.php.

    So before today, the homepage had a welcome YouTube video (where the fake video splash graphic is now). There were also two columns of text below the video. In the left column was the content of the welcome page (“Welcome to Big Rock Investments”); in the second column was other text content.

    Now that’s all been wiped out and replaced by a plain vanilla layout that calls the Welcome page.

    So that setting is somewhere else. Somewhere it should be calling homepage.php for the homepage layout. If I look inside homepage.php, I see coding for the specific YouTube video among all the other code.

    Okay, so the next thing to check:

    Whichever page is set as the static Page to display on the front page: Edit this Page, and ensure that it is using the correct Page template (“frontpage” or “homepage”, probably).

    Thanks, but unfortunately that didn’t work. I have only two options in the Template field: Default Template and Blog. It is now Default Template; blog converts it all to just plain text. Neither has the original layout of YouTube video and two columns.

    Is it not in a CSS or PHP somewhere to use homepage.php as the layout for the homepage?

    What Theme are you using?

    Unfortunately, your problem is one that is impossible to assess generically, as the problems you are having are entirely Theme-dependent.

    This is a custom theme developed for me by some VAs. I wish it was a cookie-cutter theme – I agree that would make it easier to debug. But what gets me is that it was fine last night and the only thing I’ve since changed is some page titles in the All-In-One plugin for SEO purposes. That’s it. Now I’m left wondering how in the world another setting somewhere or a PHP/CSS file got changed. I’ve no clue.

    Without being able to see the Theme template files, the best I can say is probably to see if the folks that developed the site for you can figure out the problem?

    Not likely since I burned that bridge after their refusal to complete the job.

    I found the following code for my page.php. It looks like the top has a condition to see if the page is the homepage… is this the key?

    <div id="bg2">
    <div id="wraper2">
      <div id="leftside">
    <?php get_header(); ?>
    <div id="Content">
    <div class="padright2">
    <?php if(the_home_page()){?>
    	<div class="video"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/video.jpg" alt="Vidoe" /></div>
    <?php } ?>
    	<?php if (have_posts()) : ?>
    		<?php while (have_posts()) : the_post(); ?>

    That the_home_page() conditional is a custom function. Can you find where it is defined in your Theme’s functions.php file?

    The word ‘home’ is mentioned ten times, but here’s the only section that contains the full string “_the_home_page”

    	function the_home_page(){
    		if(the_slug() == 'home'){
    			return true;
    			return false;

    Okay, you need to be using a page with a page slug of “home”. You can leave the Page Title whatever you want, but the slug needs to be “home”.

    Then that function will return true.

    That would also explain why changing your Page Titles caused the problem.

    (P.S. there are MUCH better ways to do this. I can try to help you make this a bit more flexible. But let’s try to get it working as it was again, first.)

    Ok, I’m starting to follow you now. So one of my pages should already have a slug of ‘home’? I just looked at them all and none of them do. The only potential page that would serve as this is the aptly titled “Welcome to Big Rock Investments” page. However, this page has no slug and does not have the Edit button for me to enter one. It’s as if it’s “non-sluggable”. The only button next to the permalink of http://BigRockInvestments.com/ is “View Page”.

    And so I’m saying the right things, I did not change the actual WordPress page title field, I changed the page title in the All-In-One plugin section below the text body of the page which serves to overwrite the default WordPress page title. Hope this makes sense.

    Btw, thanks so much for helping me through this.

    You might try disabling the SEO plugin, just for troubleshooting purposes. (My own preference is not to use such plugins, anyway – but to each, his own).

    Are you saying that, on the Pages screen, you cannot see the field to edit the Page slug? And likewise from the Edit Page screen?

    My guess is, the correct page previously had a slug of “home”, but that either you or the SEO Plugin changed it recently. Since the custom function is looking specifically for this Page slug, it’s no longer returning “true”, and you’re not seeing your expected content.

    (And no worries; I’m happy to help!)

    Ok I tried disabling the plugin, but no changes.

    It turns that I can view the slug on the Pages screen if I hit ‘Quick Edit’ and the current slug is indeed ‘home’ (no quotes). But if I go to the individual page itself, there’s no option for me to input a slug. It’s as if it’s hardcoded to root domain “http://bigrockinvestments.com” .

    So if there current slug is really ‘home’, then I wonder why the function is not being invoked…

    Can you do a screenshot of the Page Edit screen, showing what you see where the Page Title/Page Slug fields (normally) are?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Resolved] Help! Changing homepage to homepage.php’ is closed to new replies.