So I'm using the 'post-name' pretty permalink structure.

I have a page called The Trust, the slug of this page is the-trust.

But when i go onto www.mydomain.com/the-trust, it shows the the homepage. The URL stays the same, but it displays the index.php page.

It used to show me the archive.php page, but I removed that from my theme files so now it shows me the index page.

How can I fix this?

  • If i change the slug to the-trusts, it displays the page fine, however I want the slug to stay as the-trust.

  • I used to have a php file in my theme folder called thetrust.php (i've removed that now), the template file that is assigned to The Trust page is called trust-articles.php

Thanks in advance.

EDIT: The page does work with Ugly permalinks so www.domain.com/?page_id=174


Can you go to Settings/Permalinks and click Save Changes. That will flush the permalinks. You could look at the 'Debug wp_redirect' plugin.

Edit: Another idea is to determine what template file is in use. I have a small function plugin that adds debug comments to the header and footer for logged in Editors or Admins.

I have uploaded it to pastebin.com. Copy it to a text file and upload it to wp-content/mu-plugins or to wp-content/plugins and then activate it. Reload your page and search for "get_template_name" and tell us the filenames listed on that line and the 2 lines after it.


  • Hey, I tried resetting the permalinks but it did not work. Also the plugin didnt seem to display anything on the homepage. Aug 5 '14 at 11:56
  • I have updated my answer to include a link to a debug function plugin that I wrote and use a lot. Maybe I should have added another answer but SE seemed to discourage this. Aug 6 '14 at 15:19
  • Hi, thanks for the update. The problem was that I didnt have an archive page for The Trust posts, so it was leading to default archive page, and when I deleted that it redirecred to homepage. So to fix it I just created a custom-archive page. Now it works. Aug 7 '14 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.