ccastilla37
Forum Replies Created
-
Oh wow. I just did. But it deactivated the main OceanWP theme. It doesn’t matter? If so, now it is activated, I guess I can add that code now, right?
I believe so. How would I check that?
I removed the bracket. Yes sir. The site is online now.
So I cleared the cache with W3 Total Cache and put the code in the OceanWP child theme and still do not work. This is how the coding on it looks (see below). Also, I put the website live so you can see it on mobile. wwww.dtechcalibration.com
<?php
/**
* Child theme functions
*
* When using a child theme (see http://codex.ww.wp.xz.cn/Theme_Development
* and http://codex.ww.wp.xz.cn/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.ww.wp.xz.cn/Plugin_API
*
*//**
* Load the parent style.css file
*
* @link http://codex.ww.wp.xz.cn/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 );function no_meta_viewport() {
return false;
}
add_filter( ‘ocean_meta_viewport’, ‘no_meta_viewport’ );
}I already removed them. The thing is I do not want it to be mobile optimized. I want the desktop view on all devices, even mobile. It is really give me headaches lol
Sorry. I meant to put that the site is not active yet so no live version available.
See below what I have on my Editor for OceanWP child theme. The bottom part is what I’ve added in order to accomplish what I want to do but no luck…
<?php
/**
* Child theme functions
*
* When using a child theme (see http://codex.ww.wp.xz.cn/Theme_Development
* and http://codex.ww.wp.xz.cn/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.ww.wp.xz.cn/Plugin_API
*
*//**
* Load the parent style.css file
*
* @link http://codex.ww.wp.xz.cn/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’ );function remove_media_queries() {
wp_dequeue_style( ‘responsive-media-queries’ );
}
add_action( ‘wp_enqueue_scripts’, ‘remove_media_queries’, 20 );add_filter(‘ocean_meta_viewport’, ‘owp_child_viewport’);
function owp_child_viewport( $viewport ){
$viewport = ‘<meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0″>’;
return $viewport;
}