• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

switch to desktop version

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › switch to desktop version

This topic is: not resolved

Tagged: desktop, mobile, responsive

  • This topic has 1 reply, 2 voices, and was last updated 10 years, 3 months ago by Badlywired.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • February 4, 2015 at 8:43 am #139648
    pollux51
    Member

    Hi everyone,

    I've been busy building a blog site using the Foodie Pro theme.
    I think the setup and layout of the responsive version looks great, but I was recently talking to two of my clients. One was complaining about being forced to view the responsive site on his phone when he just wanted to see the mini version of the desktop site. The other liked the fact that a responsive site made things more readable and clear than having to zoom in on the site though her smartphone.

    My question is, does anybody know some code, or a plugin that can provide the mobile version with the option to switch to the desktop site?

    Thanks!

    February 4, 2015 at 3:32 pm #139703
    Badlywired
    Member

    This is interesting, as a similar issue came up on a Linked in WordPress group. The consensus was that clicking and zooming around a desktop site is only preferred by very few and probably isn't worth the effort.

    As this is fairly rare requirement, I doubt that any one has specifically coded a solution as a plugin.

    It should, in theory be possible with a little bit of coding.

    The outline would be to set a session cookie to determine preference and then switch the viewport, genesis makes this fairly easy. The following isn't complete code to any extend but covers what I am thinking about. It probably would only take an hour or two to get a working solution.

    //* Add custom Viewport meta tag for mobile browsers
    add_action( 'genesis_meta', 'sp_viewport_meta_tag' );
    function sp_viewport_meta_tag() {
    
       if    (desktop_required() ) {
            //  fixed viewport: note width must be set to your themes desktop width  thismight be 1024 or another number
             echo    '<meta name="viewport" content="width=924, maximum-scale=1">';
             } else {
            // responsive viewport
    	echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
    }
    
    function desktop_required() {
         // some code here to examine a cookie or option to return true if desktop layout is demanded
    }
    
    add_action( 'genesis_after_footer'  'do_some_link_stuff');
    function  do_some_link_stuff() {
        // code to display mark up for a link that has logic that displays  depending on desktop_required())
        //  and is also hidden in css over  a width of say 480px
        echo '<div class='hide-on-desktop'>';
           if (desktop_required()) {
                   //  link - show mobile format  - this link if clicked will have to do something like set a cookie or option
          } else {
                  //  link - show desktop format - this link if clicked will have to do something like set a cookie or option
         }
        echo '</div>';
    
    }
    
    

    My techy blog WordPress and stuff badlywired.com

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble