• `function keywords_createRewriteRules($rewrite) {
    global $wp_rewrite;

    $keytag_token = ‘%tag%’;
    $wp_rewrite->add_rewrite_tag($keytag_token, ‘([0-9]+)’, ‘p=’);

    $keywords_structure = $wp_rewrite->root . “dummy/$keytag_token”;
    $keywords_rewrite = $wp_rewrite->generate_rewrite_rules($keywords_structure);
    return ( $rewrite + $keywords_rewrite );
    }
    add_filter(‘mod_rewrite_rules’, ‘keywords_createRewriteRules’);`

    Shouldn’t this code allow me to also view posts with the url scheme /dummy/23532 ?

  • The topic ‘Whats wrong in this code (rewrite plugin)’ is closed to new replies.