• Short:
    How do I link to a page that changes (the link, not the page) based on the browser, or device, someone uses to view my site?

    Long:
    I am redoing my company’s website. There is an external site we link to for listing some products; http://www.brookstractor.net. Then click “Machines for Sale“. If you visit brookstractor.net on a phone, it loads the mobile site (m.brookstractor.net). Scrolling down, then tapping “View Construction Equipment Inventory For Sale” brings up the same listing as before, but now it’s mobile friendly. The problem is the “desktop” and “mobile” listings use two different URLs. And I don’t want to direct a visitor to brookstractor.net first.

    Any thoughts?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Easy:
    Link to the mobile site (it looks better anyway)
    Harder:
    Change the navigation in use when accessed from a mobile device. Register a custom menu for mobile and use a conditional: if a mobile device (either based on user agent or screen size) show mobile menu, else display regular menu.

    Thread Starter jmducat

    (@jmducat)

    Yeah, the current brookstractor.com is shitty, but the new, un-launched, WordPress built one is fairly slick.

    I wanted to avoid linking directly to the .net site because I don’t want a visitor to have to click twice to get to the equipment listing; I want the link to take you to the proper listing style (desktop or mobile).

    Is changing an entire menu necessary when it’s just the one link? I use this plugin (http://wordpress.org/support/plugin/responsive-select-menu) to alter the menu for smaller browser sizes and I’m checking to see if I could set the menu item’s URL to be different when this menu activates, as a possible workaround.

    If the plug in allows you to specify a different menu, it’s doing sort of what I suggested above. I’ve a feeling though it just converts an existing menu.
    The problem with changing one link is it’s hard to isolate one link in an array.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Browser based links in WP site’ is closed to new replies.