Support » Plugin: Shortcode Redirect » Minor hack to remove seconds delay

  • This is an edit I did that works really well, figured I’d share it here….

    – Wolfe

    add_shortcode('redirect', 'scr_do_redirect');
    function scr_do_redirect($atts)
    	$myURL = (isset($atts['url']) && !empty($atts['url']))?esc_url($atts['url']):"";
    	$mySEC = (isset($atts['sec']) && !empty($atts['sec']))?esc_attr($atts['sec']):"0";
     <meta http-equiv="refresh" content="<?php echo $mySEC; ?>; url=<?php echo $myURL; ?>">
    		wp_redirect($myURL, 301,'Redirected by ' ) ;
    	return ob_get_clean();
    • This topic was modified 2 years, 9 months ago by danwolfe. Reason: typo

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author cartpauj


    This may cause “headers already sent” errors if output has already started for the page.

    Where did you make the edit? Sorry, I know enough code to do what I need to do and research the rest. Thanks for your help.

    Never mind. I see you replaced the text on the plugins php file. It worked. Nice.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Minor hack to remove seconds delay’ is closed to new replies.