Title: Whats wrong in this code (rewrite plugin)
Last modified: August 18, 2016

---

# Whats wrong in this code (rewrite plugin)

 *  [xlingy](https://wordpress.org/support/users/xlingy/)
 * (@xlingy)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/whats-wrong-in-this-code-rewrite-plugin/)
 * `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.

## Tags

 * [rules](https://wordpress.org/support/topic-tag/rules/)

 * 0 replies
 * 1 participant
 * Last reply from: [xlingy](https://wordpress.org/support/users/xlingy/)
 * Last activity: [19 years, 4 months ago](https://wordpress.org/support/topic/whats-wrong-in-this-code-rewrite-plugin/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
