Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author uniquelylost

    (@uniquelylost)

    Apologies for the late reply. I can’t replicate this problem, do you have a caching plugin installed by chance? Or a URL I could take a look at?

    Hi uniquelylost,

    I am having the same issue. but on all browsers.
    Our site is a one page design.

    The redirect works well on mobile devices.
    However when you view the site on a desktop, and click on one of the menu items in the nav bar it redirects you to mobile url rather than just scrolling down to the navigation anchor.

    https://www.pmngroup.com/wordpress (desktop site)
    https://www.pmngroup.com/wordpress/mobile-home (mobile site)

    Advice greatly received.
    Mandy

    Plugin Author uniquelylost

    (@uniquelylost)

    “However when you view the site on a desktop, and click on one of the menu items in the nav bar it redirects you to mobile url rather than just scrolling down to the navigation anchor.”

    Hi, that is rather strange… looking at the site now I can’t reproduce the desktop issue in chrome or firefox, but im not seeing the redirect on mobile from /wordpress to /mobile-home either. Maybe the plugin is not active now?

    Are you only looking to do that one page redirect as well?

    Hi Uniquelylost,

    The issue I was having with the redirect showing the mobile url on desktop has fixed itself. Im not sure how that happened.

    however – the site does not seem to be re-directing at all now.
    Ive checked the plugin, it is activated.

    any suggestions?

    Plugin Author uniquelylost

    (@uniquelylost)

    Any caching plugins installed? If not my guess is another plugin or theme conflict. You could try disabling plugins one by one and see if it works when one is off.

    If that’s not possible to try and you only want to redirect that one page I could give you a snippet of code to add or a very small plugin. For the page you would like to redirect I would need the exact title of the page from the wordpress editor, or the page id number…

    When SEO Yoast is deactivated the redirect works.
    Yoast is a plugin we intend to use, so are reluctant to have it deactivated.

    Yes please, if you are able to provide us with an alternate solution that will enable us to run both your plugin/code along with yoast that would be very much appreciated.

    We will be moving our site into our root folder in the next week or so, will that cause any issues and will i be able to amend this code if we have any issues when we are ready to go live with our site?

    Redirecting desktop home page – https://pmngroup.com/wordpress/
    to mobile device (phone only) home page – https://pmngroup.com/wordpress/mobile/
    (when we go live we will be dropping “wordpress” from the url)

    Plugin Author uniquelylost

    (@uniquelylost)

    Hey you can try this code for the single page redirect.

    Add it to your functions.php file, but first you will need to fill in either the page title or page ID of the page you want to redirect and the URL you would like the redirection to go

    Let me know how it goes.

    // add mobile redirect
    function ndgraphic_mobile_redirection() {
    	if ( wp_is_mobile()) {
    		if (is_page('Sample Page')) {
    			wp_redirect('https://yahoo.com');
    			exit;
    		}
    	}
    }
    add_action('wp_head','ndgraphic_mobile_redirection');

    Hi Uniquelylost,

    Thanks very much for the snippet of code.

    Unfortunately we are not having consistent results with it. On initial load, it loads the mobile site, however when you click onto the home logo at the top left or click on one of the sub pages located in the group tab and click the home logo again – it diverts you back to the desktop site instead of loading the mobile site.

    Are you able to advise any further suggestions?

    many thanks

    Plugin Author uniquelylost

    (@uniquelylost)

    Hmm.. inconsistent results with the code above would make me think you have some kind of caching going on…

    Okay so I found this in the html

    <!-- Performance optimized by W3 Total Cache. Learn more: https://www.w3-edge.com/wordpress-plugins/
    Page Caching using disk: enhanced
    Served from: @ 2015-07-07 17:46:20 by W3 Total Cache -->

    To solve this go to the W3 Total Cache settings (“Performance” tab in the wp-admin) > Page Cache > Reject User Agents, and enter these User Agents.

    iPhone
    Android
    iPad

    instructions can be found here https://apppresser.com/docs/troubleshooting/w3tc_on_mobile/

    Let me know if that works?

    Plugin Author uniquelylost

    (@uniquelylost)

    closing old issue, if problem reoccurs please open a new support thread.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Chrome redirecting to mobile on desktop view’ is closed to new replies.