• Resolved hearthmoon

    (@hearthmoon)


    [ Moderator note: moved to Fixing WordPress. Please do not use Developing With WordPress for these topics. ]

    I have a several pages in my wordpress child theme (running off 2016) with page-{slug} as the name of the page. This works fine on my local host, but the live site will not navigate to the page-{slug}. The live site wants to use page.php as the template for all pages. I cannot reach the page-{slug} through the browser or through a link on the live site (but again, on local host I can navigate to the custom template just fine).

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    Perhaps, it’s your permalink structure, try setting it similar to what you are using on your localhost.

    You can also try creating a custom page template that is reusable.
    https://premium.wpmudev.org/blog/creating-custom-page-templates-in-wordpress/
    The custom page template can be selected in your page editing interface, and will work irregardless of your slug or permalink structure.

    Thank you

    Thread Starter hearthmoon

    (@hearthmoon)

    Thank you for your reply. Permalinks were the same on local and live site. Custom template should not be necessary for just one page as a comment in the article you kindly linked to pointed out. I did try turning a page into a custom templates as suggested, however, to no avail.

    But the problem is resolved! After a good night’s sleep I noticed there was one page-{slug} that was working. What was different about this page? It had a longer name. Yep. Apparently you can’t give your page a three letter name, ever, not any three letters, even if it doesn’t appear to conflict with other pages.

    Hi,

    You are welcome. Thank you for your reply.
    Glad to be of some help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘custom page template not working’ is closed to new replies.