I've changed the permalinks to add a string at the beginning of the url like this: /london/%postname%/ This works perfect for all the pages but not for my home page.
I set my home page to be a single custom post type in settings->reading->static page so the url was like this: http://example.org/destination/london
But now it's: http://example.org/london/destination/london
How can i change it so the home page is just the single custom post type without the "/destination/london" part?
Edit:
After adding this code it almost work:
function enable_front_page_destination( $query ){
if('' == $query->query_vars['post_type'] && 0 != $query->query_vars['page_id'])
$query->query_vars['post_type'] = array( 'page', 'destination' );
}
add_action( 'pre_get_posts', 'enable_front_page_destination' );
But now the home url is http://example.org/ and it should be http://example.org/london
Thank you.