I have a custom post type set up as Event. Within this post type I have various bit's of content / custom meta which will be used on two or three different pages.
I was wondering lets say I had my custom post type url as
http://www.mysite.com/my-custom-post-title/
and on that page I had 3 links that when clicked would load the relevant content i.e.
http://www.mysite.com/my-custom-post-title/faqs/
http://www.mysite.com/my-custom-post-title/directions/
I could achieve what I want with query string parameters on the initial URL but was wondering if I could use pretty URL's rather than have http://www.mysite.com/my-custom-post-title/?subconten=faqs
I know you can do your own rewrites I am just not sure how best to approach it.
Update:
So assuming I have the following URL:
http://www.mysite.com/events/my-custom-post-title/info/directions/
I have added the following action
add_action('init','custom_rewrites');
function custom_rewrites() {
global $wp,$wp_rewrite,$wp_query;
$wp->add_query_var('content_filter');
$wp_rewrite->add_rule('events/([^/]+)/info/([^/]+)/', 'index.php?post_type=portfolio&name=$matches[1]&content_filter=$matches[2]', 'top');
$wp_rewrite->flush_rules(false);
// print_r( $wp_rewrite );
}
Still nothing - I have found that if I dump query vars to the screen on the 404 page "direction" returns as attachment. Anyone have an idea how I can get this working?
Steve