Support » Plugins and Hacks » [Plugin: Smart 404] Hack to make short links

  • mango45

    (@mango45)


    Marvelous! An excellent plugin that works just as it should.

    I modified it slightly to allow dynamic shortlinking:

    $possible_post_id = trim($_SERVER['REQUEST_URI'], '/');
    if (is_numeric($possible_post_id) and $permalink = get_permalink($possible_post_id)) {
     // 301 to the proper link if just the post ID is used.  Good for dynamic short links.
     wp_redirect($permalink, 301);
     exit;
     }

    http://wordpress.org/extend/plugins/smart-404/

  • The topic ‘[Plugin: Smart 404] Hack to make short links’ is closed to new replies.