WordPress.org

Ready to get started?Download WordPress

Forums

Editing page.php (3 posts)

  1. Maracas1970
    Member
    Posted 2 years ago #

    Hello my site http://www.gotodesigns.co.uk/ is using a child theme. I have hard coded the page.php file to include the three divs you`ll see upon landing. I have set the front page to static and all references to the loop are stripped from the page.php file.

    What i would like to know is if this a good practice or common way to go about creating a unique homepage layout through a child theme?

    I have also as i suspected made every new page i create contain the homepage content, which obviously i don`t want to do. Is there a function that hides all references on internal page, if home display: none? Or some such. Just guessing obviously. I just want a fairly unique home page that has two top columns below a large jQuery slider. And would like the ability to feed latest posts into one of the columns/divs i made. I am thinking i need to create possible a new php file with home.php as the name maybe, and create the layout in this? and then other php files wont be affected, and if this is the case how do i get WordPress to display this page as the homepage? Am i even close to the mark here?

    Thanks for looking

    Maracas

  2. Maracas1970
    Member
    Posted 2 years ago #

    I have added a file front-page.php, and put all my hard coding for the homepage in here and this appears to have cleared up the issue of the content appearing on all internal pages.

    Still would like to know if this is good/common working practice?

    Thanks

  3. Maracas1970
    Member
    Posted 2 years ago #

    Or maybe i just keep the homepage i set up in the reading settings when i swapped the front page for homepage round and enter the html structure here? Because when i entered the html into the frontpage.php file and loaded it, it seemed to lose a lot of the styling and the html elements seemed to go skewed.

    Thanks

    [No bumping. If it's that urgent, consider hiring someone.]

Topic Closed

This topic has been closed to new replies.

About this Topic