Reputation: 2914
I am new to wordpress and trying to get my head around it. I figured that I can create a custom php file as
<?php
/*
Template Name: The Story
*/
?>
<?php get_header() ?>
<?php get_sidebar(); ?>
<div class="story_content"><?php echo get_option('story-content') ?></div>
<?php get_footer() ?>
and in the admin panel , I can add a new page and choose "the story" as the template , which will in turn , give me an URL as http://www.example.com/thestory
But for the life of me , I can't figure out how to have a directory structure in the website such as http://www.example.com/products/thestory
Can someone help me out here.
Thanks already!
Upvotes: 0
Views: 33
Reputation: 27102
You can achieve this with "Pretty Permalinks" enabled in WordPress, by simply creating two pages:
/products
/thestory
(it will automatically be appended to the parent slug: /products
)This can all be done from within the Dashboard Pages area, without editing templates.
Upvotes: 1