Redirection happens on search pages
-
Please add a condition like below to prevent redirections from happening on search page. I know there is another topic with the same issue. Thought this should be included in the future update of the plugin.
add_filter('template_redirect','me_spr_permalink_redirect'); function me_spr_permalink_redirect($permalink) { global $post; if(!is_search()) { $url = get_post_meta($post->ID,'me_spr_post_redirect',true); if (!empty($url)) { wp_redirect($url,301); exit; } } return ; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Redirection happens on search pages’ is closed to new replies.