For some reason even when I am selecting a static page for my homepage it is still choosing to load the index.php file.

I would really appreciate your help on this as I would like it to load my own page.php template.

  • 1
    On this static page that you're assigning (on settings > reading I assume on the dashboard) - are you assigning your custom template to it? codex.wordpress.org/Page_Templates#Selecting_a_Page_Template – RachieVee Sep 16 '14 at 20:29
  • Hi there thank you very much for your response. Yep I am. If I view the page without it being selected as the homepage it works fine. However, when I select it as the homepage it just loads the index.php file – KM123 Sep 16 '14 at 20:32
  • 1
    Did you assign another dummy page for the Posts Page on Settings > Reading? So the default blog posts have a place to be? This may help narrow down the problem: codex.wordpress.org/Template_Hierarchy#Front_Page_display – RachieVee Sep 16 '14 at 20:44
  • 1
    Are you aware of the home.php and front-page.php templates? You don't need to use page templates to style the homepage – Tom J Nowell Sep 16 '14 at 20:46
  • Currently I only have a single page built and this is the one that is selected. When I deselect it as the homepage it works fine just not when selected as the front page. Hi Tom in regards to these pages I need to use the page templates as it is a very complex and dynamic theme – KM123 Sep 16 '14 at 20:48

if it is "a very complex theme," then there's probably some hook into template_redirect malfunctioning. as @TomJNowell mentioned, using home.php or front-page.php should allow you to override page.php, but that's not always preferred (I rarely use them myself), and will not necessarily fix the problem. you don't need to assign a blog page in order for there to be a static front page, so double-check on any hooks into template_redirect, and see if that resolves the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.