Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author B.

    (@bandonrandon)

    It looks like you have two installations of WordPress are you sure you are setting the mobile URL and have the plugin installed in the correct one?

    Also do you have any mobile plugins installed? Maybe try with JUST the mobileESP activated on the main site and see if it still won’t redirect.

    Plugin Author B.

    (@bandonrandon)

    I just pushed 1.5.3 which fixes a bug where it wouldn’t work if you were using a PHP version prior to 5.3. Please upgrade to this version and let me know if the plugin is fixed.

    Thread Starter amazemedia

    (@amazemedia)

    I previously had WP Touch installed but it was deactive. I deleted that plugin and removed extra files it left behind.

    I tried 1.5.3 but iPhone Safari but get Safari cannot open the page because too many redirects occurred. I cleared my phone cache but same msg.

    Same thing on Android phone.

    I’m no longer using 2 installations I’m simply trying to redirect to:
    https://www.goensouthweddings.com/mobile-homepage/

    I only have a few plugins installed one is Page Links To https://www.ads-software.com/plugins/page-links-to/

    but I’m not using that plugin on home page or mobile page.

    Plugin Author B.

    (@bandonrandon)

    I know what’s happening now. 1.5.3 DID fix the plugin. However, because both your mobile site and desktop site are within WordPress the user is continually being redirected to the mobile site casuing an infinate loop (too many redirects)

    Couple things to try:

    • Redirect back to the mobile site on the other URL (just make sure you don’t have the plugin active on that mobile site)
    • Use !is_page('mobile') around the redirect. ‘mobile’ will have to be the page slug or ID of your mobile page. If you aren’t sure how to do this let me know.
    • Move the mobile page to its own directory and use it as a static html site NOT a WordPress page

    I would recommend the first or second option.

    Thread Starter amazemedia

    (@amazemedia)

    I’m using PHP 5.2.17 with no caching plugins.

    I’d prefer to redirect to a page so I don’t have a to maintain 2 installations.

    For option #2 I renamed redirect page slug to mobile

    For Where do we send mobile devices? should it now be what’s below?

    https://www.goensouthweddings.com/mobile!is_page(‘mobile’)

    Or is supposed to go somewhere else?

    Thank you for your time and willingness to help.

    Plugin Author B.

    (@bandonrandon)

    No you actually have to modify the plugin itself as this is not the default behavior of the plugin. So open mobileesp_wp.php

    and change:

    if((esc_url(get_option('mobileesp_wp_target_url') != '')) && (empty($full_site_cookie))){

    to

    if((esc_url(get_option('mobileesp_wp_target_url') != '')) && (empty($full_site_cookie)) && (!is_page('mobile'))){

    note these changes will be overwritten with each plugin update. I may add an option in the next version to allow this if the need is there but right not you’re the only one using it this way to my knowlege.

    Thread Starter amazemedia

    (@amazemedia)

    Thanks homepage is working however all pages keep redirecting to homepage. I saw previous post and tried

    if (($detect_mobile == 1) && (is_home())) {

    But that didn’t work so I tried

    if (($detect_mobile == 1) && (is_home())) {
    wp_redirect(esc_url(get_option(‘mobileesp_wp_target_url’) != ”)) && (empty($full_site_cookie)) && (!is_page(‘mobile’));

    But that sends everything to desktop home.

    Plugin Author B.

    (@bandonrandon)

    Huh? It’s redirecting all pages to the Homepage on both your phone and on desktop?

    It also seems that you put the code in the wrong place. The mobile page check needs to go above the redirect check. Find the exact line I asked you to replace and replace just that line.

    Thread Starter amazemedia

    (@amazemedia)

    It’s just redirecting on all pages to the mobile homepage for my phone. Desktop works fine.

    I redid code and only replaced one line as explained above.

    All links on phone still load mobile home page.

    Plugin Author B.

    (@bandonrandon)

    So wait, I may be thinking about this the wrong way. So you are using the mobile page as a “landing page” where mobile users are redirected to the mobile page and then they go on to the other pages?

    If so we’ll have to change the code around.

    Thread Starter amazemedia

    (@amazemedia)

    Yes that is correct.

    Sorry for the confusion on my part. I did initially have a mobile site in mind but my theme (Studiofolio) developer recently added an other front page feature and I only need the front page redirected for mobile.

    Plugin Author B.

    (@bandonrandon)

    Okay, in that case let’s just see the view_full_site cookie upon the first visit to the mobile page (this will allow them to visit the desktop home page after they have been redirect once to the mobile one.

    Add this code to set the cookie below the if statement

    setcookie("mobileesp_wp_full_site", 1, time()+86400, "/", $domain);
     $_COOKIE['mobileesp_wp_full_site'] = 1;

    So you should now have:

    if((esc_url(get_option('mobileesp_wp_target_url') != '')) && (empty($full_site_cookie)) && (!is_page('mobile'))){
         setcookie("mobileesp_wp_full_site", 1, time()+86400, "/", $domain);
          $_COOKIE['mobileesp_wp_full_site'] = 1;
    // rest of redirect code (leave the actual code in there

    You could change your desktop home url in the menu to www.goensouthweddings.com?view_full_site=false to unset the cookie and redirect the user back to the home page if you wanted to force mobile users to only see the mobile home page and never the desktop one.

    Hope that helps.

    Thread Starter amazemedia

    (@amazemedia)

    You rock! Working great on my iPhone!

    Where’s the tip jar? I didn’t see one on your website. I’m not rich but I can certainly flip a tip for a beer, sundae or a fraction of your light bill ??

    Plugin Author B.

    (@bandonrandon)

    I am marking this ticket as resolved. Some ways you can say thanks are by writing a review of the plugin. I also did just add a donate button to my tech blog you’ll see the button in the sidebar.

    Glad we were able to get this figured out.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Not working’ is closed to new replies.