How to call pages with custom layouts and permalinks properly?
-
I have a customized theme (using Sandbox theme as base) where I use custom page layouts. If I need to call a custom page, I do something like this in page.php (at the template):
<?php if ($_GET['page_id']=='7') include(TEMPLATEPATH.'/custom_contacts.php'); else if ($_GET['page_id']=='2') include(TEMPLATEPATH.'/custom_gallery_main.php'); else if ($_GET['page_id']=='5') include(TEMPLATEPATH.'/custom_web.php'); ?>.
I always thinked that this is a primitive way, and there should be more clever solution. But it worked, so left it at is.
Now I need to use custom permalinks, for example, http://www.example.com/about-me/ instead of http://www.example.com/?page_id=7 , so my way of getting custom page layout doesn’t work. How should I do it properly?
Thanks for help 🙂
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘How to call pages with custom layouts and permalinks properly?’ is closed to new replies.