skip to Main Content

As per my requirement i need a theme which support only Desktop View. Please answer soon.
In my existing theme i removed meta viewport code from header, but still mobile responsive is working. What to do now.

3

Answers


  1. Aha you sold a site to a client and told him that it was more expensive to get it responsive, so he didn’t take the option ? And now you want to disable the responsive that is set by default with your theme ^^.

    Remove this in functions.php

    function et_add_viewport_meta(){
        echo '<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />';
    }
    add_action( 'wp_head', 'et_add_viewport_meta' );
    

    You will also need to remove all the css codes on your theme that are after comment like that

    /* Responsive Styles Tablet And Below */
       remove code here ...
    /* Responsive Styles 782px */
       remove code here ... 
    /* Responsive Styles Smartphone Only */
       remove code here ...    
    /* Responsive Styles Smartphone Portrait */
       remove code here ...    
    /* Responsive Styles Tablet Portrait And Below */
       remove code here ...
    

    Just go here and follow the tutorial :
    http://www.agentwp.com/disable-responsive-design-in-divi-wordpress-theme

    Login or Signup to reply.
  2. how to usage in code for working full destop work
    
    If you must do it, then the process to make Divi unresponsive is following.
    
    • Open functions.php file and delete this code,
    
    function et_add_viewport_meta(){
        echo '<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />';
    }
    add_action( 'wp_head', 'et_add_viewport_meta' );
    
    Login or Signup to reply.
  3. // Remove Divi Default Viewport <meta>
    function remove_divi_actions() {
    remove_action( ‘wp_head’, ‘et_add_viewport_meta’ );
    }
    // Call ‘remove_divi_actions’ during WP initialization
    add_action(‘init’,’remove_divi_actions’);
    

    Rather than editing the Divi parent theme functions file, add this as a snippet, or to a child theme function file.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search