• Resolved boburn2020

    (@boburn2020)


    Hi,
    I am moving my website from my local windows environment to an Azure Ubuntu server. However, i can across a problem. I have two files in the format page-{slug}.php that do not load and instead give me the default page.php file instead. How do I change this? I am not sure if the file permissions are correct, or if there are certain read/write requirements. However, I am fairly certain it has nothing to do with the content of the pages but more the settings of perhaps the .htacccess, permalinks or something else.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Are you able to give the link to one of these pages? (I mean the pages that are using the “wrong” template file.)

    Moderator bcworkz

    (@bcworkz)

    That happened to me once. I didn’t have time to track down the cause, but using the page’s ID instead of slug solved the problem. I now cannot replicate the issue, so tracking down the cause is no longer feasible for me.

    If all else fails, the “template_include” filter can be used to force the use of any template for any particular condition. In fact, it may be this mechanism that’s causing a problem for you if a theme or plugin is using it improperly.

    Thread Starter boburn2020

    (@boburn2020)

    I found the problem. It seemed that the server could not find page-about.php. Instead I had to make a file called about.php and set it as a “template” in comments. Then in the front end I set a certain page to use the “about.php” template.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Page-{slug} not redirecting’ is closed to new replies.