• I am running a WordPress site for a summer program I’m involved with. While tooling with the theme’s code, I made one of the pages explode. How do I fix it?

    This is how I got into trouble:
    Other people have worked on this site before me and edited some of the theme’s files, but I don’t have any of their documentation. Before I started working on it, the site worked fine. The home.php file had been edited to hardcode a home page for the website. I changed “Front Page Displays” settings under “Reading Settings” to “A static page” so that I could control the home page using the built-in pages system. When I did this, though, the page displaying blog posts started displaying the content of the old home.php file. I copied the contents of index.php to home.php, hoping to make the blog post page work. The page exploded ??

    This is what the blog post page looks like now: https://www.thesdsp.com/?page_id=85

    This is what the home.php file has:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    What should I do to get the page working again? Is there a working home.php file I can copy? If I’m in serious trouble, I still have the code I replaced and can go back to the system that was in place before I started working.

Viewing 2 replies - 1 through 2 (of 2 total)
  • first, open your style.css file and replace the “repeat” value with no-repeat fixed top center; (you can choose repeat-x for example, to repeat the image horizontal, but instead of this, you can choose no-repeat and set a #000-black background.)

    body {
    background: url(“images/beach.jpg”) repeat fixed 0 0 #666666;
    color: #222222;
    font-family: Arial,Tahoma,Verdana;
    font-size: 12px;
    margin: 0 auto;
    padding: 0;
    width: 980px;
    }

    the rest of content, following the div with id content, must be cutted and pasted intro the div#content (this last modification should be made in the php file)

    The primary problem is that home.php is the template file used to display the Blog Posts Index, not the Site Front page.

    In WordPress parlance, the “Home” page is the Blog Posts Index; the main page of the site is the “Front Page”.

    If you want to modify the appearance of the Site Front Page, you need to create (or edit) the front-page.php file.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Broken home.php’ is closed to new replies.