WordPress.org

Ready to get started?Download WordPress

Forums

rewrite_rules_array Create Plugin with parameter (1 post)

  1. WPYoda
    Member
    Posted 1 year ago #

    Hello,

    i have a problem. I want to create my one Plugin. I set a shortcode in an page (/test/). This works and show a list of cars. Now I want to link the cars to /test/Ford/ but it say "not Found". Whats wrong?

    [code]
    function create_rewrite_rules($rules) {
    global $wp_rewrite;
    $newRule = array('test/(.+)/' => 'index.php?p=54&label='.$wp_rewrite->preg_index(1));
    $newRules = $newRule + $rules;
    return $newRules;
    }
    [/code]

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.