Support » Fixing WordPress » Page Templates on “Edit” Page

  • I’ve been building custom themes for a while now, but I’ve noticed a problem with page templates. On some of my sites, they show up properly in the page editor in a drop-down menu. On other sites, they are nowhere to be found.

    I’ve looked into the built-in theme editor and noticed that it’s not recognizing the templates as templates in some sites. For example:
    Page Template: Contact Form
    …will be recognized as “Contact Form Page Template” on some sites, but not on others.

    I can override this in the post_meta table directly. For those of you curious, make sure you know the page ID and the filename of your page template. Set the meta ID “_wp_page_template” to be equal to the filename you want to use.

    This works … but I really don’t like having to edit the database directly. Any idea what bug I’m looking at fixing?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Don’t know why that happens. But changing to something like the WordPress Default Theme, then changing back to your theme seems to make those templates appear in the dropdown.

    I tried doing that … several times … but without any success. So far I’ve been sticking with editing the database directly, but that’s not anywhere near an ideal solution.

    Oddly enough, even though I edit the post_meta table so my page will be pulling in the page template, the template still doesn’t show up in the dropdown menu. On the edit screen, there is no template selector at all. The Quick Edit screen still shows the page is using “Default Template.”

    Any idea what bug I’m fighting with?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Page Templates on “Edit” Page’ is closed to new replies.