Viewing 2 replies - 1 through 2 (of 2 total)
  • If it is not a Quick Redirect, then you can get it from the Custom Fields like any other meta data.

    Inside the loop, you would use any of these to get the values you want:

    $pprRedUrl = get_post_meta($post->ID, '_pprredirect_url', true);
    $pprActive = get_post_meta($post->ID, '_pprredirect_active',true);
    $pprNewWin = get_post_meta($post->ID, '_pprredirect_newwindow',true);
    $pprNoFoll = get_post_meta($post->ID, '_pprredirect_relnofollow',true)
    $pprRewrit = get_post_meta($post->ID, '_pprredirect_rewritelink',true);
    $pprReType = get_post_meta($post->ID, '_pprredirect_type', true);

    Then you can check to see if a redirect is active, get the URL and do whatever, like so:

    if($pprActive == '1' && $pprRedUrl != ''){
       // now do something with $pprRedUrl if you need to
    }

    Warm regards,
    Don

    Thread Starter skinnybloke

    (@skinnybloke)

    Brilliant! Thanks for that.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is it possible to get the redirect URL in PHP’ is closed to new replies.