• ashton721

    (@ashton721)


    When creating a theme, I’d like those using the theme to have their homepage set to a specific template by default. I’m aware there is a php function like is_front_page() which can execute certain properties within a template. But how can I switch between two completely different default templates depending on the homepage.

Viewing 1 replies (of 1 total)
  • Drew Westcott

    (@drewwestcott)

    Hi ashton721,

    You can create a php file which will be used whenever the homepage is selected.

    You will either have to create front_page.php is your users are using a page as their front page, or home.php if they will be using ‘latest posts’. This is set in the dashboard under Settings, Reading Options.

    More information on the hierarchy can be found here.

    Hope that makes sense, let me know how it goes.
    Drew

Viewing 1 replies (of 1 total)
  • The topic ‘Setting a default template for homepage only.’ is closed to new replies.