Rewrite rule page url with category

Just of the top of my head, something along this way might work:

function wpse178647_rewrite() {
   add_rewrite_rule(
    '^([^/]+)/([^/]+)/?$', ''
    'index.php?category_name=$matches[1]&pagename=$matches[2]',
    'top'
    );
}
add_action( 'init', 'wpse178647_rewrite' );

Completely and utterly untested.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)