Support » Fixing WordPress » Changing slug but not permalink?

  • Resolved fallenlorelei

    (@fallenlorelei)


    My employer currently uses a custom WordPress template for their main website, giving information about their company. There was once a page called “What We Do” that had 3 sections: what we do, our software, our consulting. There were links that went to #oursoftware, #ourconsulting. Recently I got a call (note: I’m not their WordPress guru but I am the only one on the team slightly familiar with it) that the What We Do page is only showing the top half of the page (the main content, written in the default page format of WP).

    Upon further investigation, it seems that somehow, at some point, the template broke for that page. The template is called “page-what.php” but the page is looking for “page-what-we-do.php” I believe. Normally I’d try to duplicate “page-what” and rename it to “page-what-we-do” but I have been trying for an hour to connect to the FTP for the website and it keeps timing out on me.

    So I’d like to change the slug for the page. I tested it by changing the slug to “what” and yay, the template updated, and it worked. But the boss doesn’t want the permalink to be “what.” It should remain “what-we-do.” I am not sure how to achieve this. Every time I change the slug, the permalink changes as well.

    Edit: I looked through the website and saw the About Us page uses the template “page-about.php” without issue (the slug is “about-us”). Why does this work but not “what” to “what-we-do”?

    • This topic was modified 4 months, 2 weeks ago by  fallenlorelei.
    • This topic was modified 4 months, 2 weeks ago by  fallenlorelei.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steve Stern

    (@sterndata)

    Guardian of the Interwebs

    The page in question has a numeric ID as well as a slug. The template hierarchy will look for page-numericid.php, then page-slug.php, and finally page.php.

    Rename page-what.php to page-x.php where x is the numeric ID for the page. That will mean the slug is irrelevant. You can see the numeric ID in the URL when you’re editing the page in question.

    Thank you Steve!

    I assume that should work perfectly. I figured out the ID is 90. But is there a way to rename the template without logging onto the FTP? After successfully logging in, it keeps failing to retrieve directory listing. Obviously, that problem isn’t WordPress related. I may have to figure something out…

    Moderator Steve Stern

    (@sterndata)

    Guardian of the Interwebs

    Do you have access to your hosting control panel? Usually, there’s a file manager app that lets you do things like that.

    Moderator Steve Stern

    (@sterndata)

    Guardian of the Interwebs

    I managed to get into the FTP by messing with some settings. Whew! And your “page-90.php” solution worked perfectly. Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.