• In the Simple URLs plugin there were the filter ‘simple_urls_slug’ so we can change the /go/ directory into something else:

    add_filter( 'simple_urls_slug', 'mr_rewrite_simple_url_go' );
    function mr_rewrite_simple_url_go($rewrite_slug_default){
    return 'promo';
    }

    Does this version has some similar filter?

    thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Matt Ryan

    (@rynonet)

    Hi @somtam

    Yes, the filter is simple_urls_legacy_slug.

    Usage:

    add_filter( 'simple_urls_legacy_slug', function(){
        return 'redirect-me';
    });

    The text “redirect-me” will replace the default “go” in example.com/go/my-simple-url.
    Eg. example.com/redirect-me/my-simple-url/

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.