Support » Themes and Templates » Page Templates and homepage

  • Resolved R22

    (@r22)


    Hi,

    I am beginner at developing themes and I got to the point I need advice.

    Let’s say I have a website with these Pages:
    About Us
    Gallery
    Services
    Career
    Contacts

    I won’t use posts, only pages. The page “About us” is supposed to be homepage and structure of this page is slightly different to other pages. (there is container with last 3 images uploaded to “Gallery”)
    Pages Gallery, Services, Career, Contacts have basically same structure.

    I have few questions:
    1) What file will specify how the page “About Us” will look? should that be index.php or front-page.php or something else?
    2) If the answer for queston no.1 isn’t index.php, what should I include in index.php apart from get_header() and get_footer() since there are no posts (=I don’t need loop for posts)
    3) Pages Services, Gallery, Career, Contacts will use template file page.php, am I correct?

    Thank you guys for your help

Viewing 2 replies - 1 through 2 (of 2 total)
  • front-page.php is the right choice for the front page, and page.php will be used for the other pages.

    As for your index.php question, it won’t really matter when things are working correctly, but I’d still recommend putting a minimal loop on that template rather than just header/footer: it’s the fallback for absolutely everything (remember, the loop works for pages as well as posts!), and as such it’s also used for things like search and 404 pages.

    Thank you very much 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Page Templates and homepage’ is closed to new replies.