• Hi

    I am using Responsive WordPress Theme and i want to make switch Desktop Version button on footer when Visitors see mobile.

    I really need to that function. please let me know how do i fix that

Viewing 5 replies - 1 through 5 (of 5 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    If your theme is responsive then this button should not exist as there’s no reason for it to. What problem are you trying to solve?

    Thread Starter cheonmu

    (@cheonmu)

    @anevins

    Thanks for answering.

    I want to make the button which can change from mobile View to Desktop View forcibly on mobile device.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Sorry I understand what you want, but it doesn’t make sense from a responsive point of view. A responsive website literally responds to the browser size and makes the content fit for that browser. It’s not like a switch.

    Can you explain the problem you are trying to solve?

    Use this as a button
    <a href="mywebsite.php?show_desktop_mode=true">I want desktop mode!</a>

    And insert following in header.php

    <?php
    session_start();
    if($_GET['show_desktop_mode'] == 'true') {
        $_SESSION['desktopmode'] = 'true';
    }
    ?>

    After doing that, you have to change the viewport according to the
    Sessionvalue by doing this in <head>

    <?php
    if($_SESSION['desktopmode'] == 'true') {
        /* DESKTOP MODE */
        ?>
        <meta name="viewport" content="width=1024">
        <?php
    } else {
        // DEFAULT
        ?>
        <meta name="viewport" content="width=device-width, initial-
    scale=1.0">
        <?php
    }
    ?>
    Thread Starter cheonmu

    (@cheonmu)

    @joy1212

    Thank you for your reply.

    I tried to insert the <?php session_start… Hearder.php file what you let me know
    and deleted <meta name=”viewport”.. > code what is inside existing Hearder.php
    and then I tried to insert mata viewport code what you told me.
    Despite that, I made the widget button
    An error what could not find mywebsite.php file has occured in the program
    What’s should I do?

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

The topic ‘How to make Switch Desktop Version button on wordpress?’ is closed to new replies.