I have a problem I've encountered when trying to finish a project.
My problem is that I want to change the permalink of the pages as I did with the posts so my pages will have a prefix like /{prefix}/%pagename%/.
What I tried and didn't work:
Tried adding a custom rewrite rule as a function but it didn't work:
$rewrite_rules += array('mycustomprefix/(.+?)/([0-9]+)/([^/]+)/([^/]+)/?$' =>'index.php?pagename=$matches[1]',
Is this possible? Are there any developers out there who encountered the same issue?
For anybody interested, I've fixed my issue in the following manner:
function change_author_permalinks() {
global $wp_rewrite;
// Change the value of the author permalink base to whatever you want here
$wp_rewrite->author_base = '';
// Change the value of the page permalink base to whatever you want here
$wp_rewrite->page_structure = 'static/%pagename%';
$wp_rewrite->flush_rules();
}
add_action('init','change_author_permalinks');
Hope this helps others as I couldn't find any help for this anywhere. For morer information on what you can change this way, check out http://codex.wordpress.org/Class_Reference/WP_Rewrite