• I am trying to turn off the responsive design and I have set up a child theme. I have also added the code to function.php like it said to in other posts.

    
    function no_meta_viewport() {
    	return false;
    }
    add_filter( 'ocean_meta_viewport', 'no_meta_viewport' );
    
    Here is currently what the function.php looks like 
    
    

    <?php
    /**
    * Child theme functions
    *
    * When using a child theme (see http://codex.wordpress.org/Theme_Development
    * and http://codex.wordpress.org/Child_Themes), you can override certain
    * functions (those wrapped in a function_exists() call) by defining them first
    * in your child theme’s functions.php file. The child theme’s functions.php
    * file is included before the parent theme’s file, so the child theme
    * functions would be used.
    *
    * Text Domain: oceanwp
    * @link http://codex.wordpress.org/Plugin_API
    *
    */

    /**
    * Load the parent style.css file
    *
    * @link http://codex.wordpress.org/Child_Themes
    */
    function oceanwp_child_enqueue_parent_style() {
    // Dynamically get version number of the parent stylesheet (lets browsers re-cache your stylesheet when you update your theme)
    $theme = wp_get_theme( ‘OceanWP’ );
    $version = $theme->get( ‘Version’ );
    // Load the stylesheet
    wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri() . ‘/style.css’, array( ‘oceanwp-style’ ), $version );

    }
    add_action( ‘wp_enqueue_scripts’, ‘oceanwp_child_enqueue_parent_style’ );

    function no_meta_viewport() {
    return false;
    }
    add_filter( ‘ocean_meta_viewport’, ‘no_meta_viewport’ );`

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Are you using the official child theme or create with any plugin?

    Kindly use the official child theme and add the below code in the functions.php file of your child theme and check.
    https://docs.oceanwp.org/article/90-sample-child-theme

    function no_meta_viewport() {
      return false;
    }
    add_filter( 'ocean_meta_viewport', 'no_meta_viewport' );
    Thread Starter innergeekdesigns

    (@innergeekdesigns)

    I am using the official child theme

    Thread Starter innergeekdesigns

    (@innergeekdesigns)

    I am using the official child theme I tried the code you gave to put in the functions.php and cleared my cache and the website is still responsive

    Thread Starter innergeekdesigns

    (@innergeekdesigns)

    sorrt it is working now I tested it on another device

    That is quite odd.
    Would you be so kind and go to Elementor > System Info and share the report with us so that we can take a look.?

    and also a snapshot of the functions.php file where code you have added.

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

The topic ‘Turning off responsive design’ is closed to new replies.