Viewing 3 replies - 1 through 3 (of 3 total)
  • What are your permalink settings?

    Cheers

    PAE

    Thread Starter petrosweb

    (@petrosweb)

    i have set the permalink to custom structure: /%postname%/

    Thread Starter petrosweb

    (@petrosweb)

    i have found the following code to rewrite the URL but i cant make it work. Any one knows whatg am i doing wrong?

    thanks..

    <code>
    add_action( 'init', 'ss_permalinks' );
    function ss_permalinks() {
        add_rewrite_rule(
            'translator/([^/]+)/?',
            'index.php?pagename=translator&service=$matches[1]',
            'top'
    );
    }
    add_filter( 'query_vars', 'ss_query_vars' );
    function ss_query_vars( $query_vars ) {
        $query_vars[] = 'wordid';
        return $query_vars;
    }
    </code>
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adjust a URL’ is closed to new replies.