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

  • 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);

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