The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Problem with wp_redirect (1 post)

  1. BandonRandon
    Posted 5 years ago #

    I am making a plugin that redirects mobile phones to a new url. Everything is set up and working fine but I get a call to undefined function error when viewing the site on a mobile phone.
    Here is the code I'm using to redirect. I could probably use Header Redirect but it's always better to use built in WordPress functionality

    if(get_option('mobileesp_wp_target_url') != ''){
    		if ($detect_mobile == 1) {

    If I wrap it in if (function_exists() i don't get an error but I also don't get a redirect.

    UPDATE 2:
    I fixed the problem by requiring pluggable.php as suggested by this article

Topic Closed

This topic has been closed to new replies.

About this Topic