WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom Page Template not working, defaulting to home page (4 posts)

  1. berchman
    Member
    Posted 6 years ago #

    I have a custom theme that has multiple custom pages. All of my custom pages are working, except one.

    I have double checked that the correct, custom theme is selected for the specific page but it does not work. It always displays the home page.

    I have checked the URL at the top and it is displaying ....?page_id=20

    Even if I change the page template from the custom version to the default page template, I still get the homepage template.

    Anyone have an idea of what might be happening here?

  2. stevejohnson
    Member
    Posted 6 years ago #

    I am having the same issue. A page with a certain template selected is not loading that template, but is loading index.php instead.

  3. berchman
    Member
    Posted 6 years ago #

    Steve,
    If you try to make the page use the default template is it also showing the homepage? index.php?
    -berchman

  4. berchman
    Member
    Posted 6 years ago #

    Thought I found the issue but alas, no luck.

    The page template in question had an underscore in the name, ie. page_template.php

    I removed that but the issue has not gone away.

    So I then created a new page, applied the page template and the template DOES work on the new page.

    Went back into page management, moved the children of the old, non-working page to children of the new page. Now things are working as they should.

    Not an elegant solution, but it worked.

Topic Closed

This topic has been closed to new replies.

About this Topic