I made a custom page template (for example, for About page), added Template Name inside the file and saved that. Then I tried to add a page in wp admin console using that template. It said that the page had been created successfully but when I try to open it in browser, it shows me 404 error. What did I do wrong?
Thanks.
I forgot to say that I set up permalinks to be /%postname%/ and then it give me that error. If I use no permalinks (default setting), it show the page normally.
I think the problem is nothing to do with your custom template, but your permalink structure.
It’s not really recommended to just use
/%postname%/– quoting from the Codex;What’s the slug (the ‘sanitized’ title used in the URL) of the problem page?