I have installed wordpress on /en folder and set siteurl on /. I transformed it to a Multisite website. it is running on topcanadavisa.com.
I used this code on function.php to define new post_type (articles):
function codex_custom_init() {
register_taxonomy('articles-category',array(), array(
'has-archives' => true,
'hierarchical' => true,
'show_ui' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'archive' ),
));
register_post_type('articles', array(
'capability_type' => 'post',
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'query_var' => true,
'publicly_queryable' => true,
'exclude_from_search' => false,
'supports' => array( 'title', 'editor', 'excerpt', 'trackbacks', 'thumbnail' , 'author', 'custom-fields' ),
'rewrite' => array( 'slug' => 'articles' ),
'has-archives' => true,
'taxonomies' => array( 'articles-category' ,'post_tag')
));
//flush_rewrite_rules();
} add_action( 'init', 'codex_custom_init' );
and wordpress set these on .htaccess:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) en/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ en/$2 [L]
RewriteRule . index.php [L]
What is happened is I am unable to set custom permalinks. all post type except "page" type returns 404 error. what can i do?