hohner
hohner

Reputation: 11588

Wordpress custom URLs and templates

Easy question: how do I create a custom URL in WordPress without creating a page first?

I know about template inheritance and I know that I can always specify a custom template in page-page_name.php. But instead of creating a page, I just want the custom template and the URL.

So if I go to http://mysite.com/custom_page_1 I want to be able to modify a template for this link and this link only without creating an empty page called Custom Page 1.

Upvotes: 0

Views: 136

Answers (2)

Astrotim
Astrotim

Reputation: 2172

To my knowledge, URLs are essentially permalinks that are generated by rewriting the default domain.com/?p=x, where x is the post ID. So unless there is something in the database that has an ID (post, page, category, user id, etc) then there is nothing to rewrite.

Upvotes: 1

wesbos
wesbos

Reputation: 26317

Are you worried about publishing a page before it should be? Make a drat of that page and preview it.

If not, why cant you create the page?

Upvotes: 1

Related Questions