Bug: activation of child theme breaks overlay css for pictures
-
I recently installed OceanWP. I tweaked it a bit, using a child theme, but seems like its activation breaks the way the css overlay for images should work. It doubles the number of overlays. When opening a picture (clicking on it), one has to click twice to close it. It happens only when the child theme is activated.
1/ I activated the child theme following Oceanwp instructions, adding the code below in my child theme’s functions.php:
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’ );
2/ You can see it into action. On the page
https://www.jcvignoli.com/blog/2020/les-qeros-un-peuple-descendant-des-incas-mais-plus-pour-longtemps
click on any picture of the text. It will open a double window (overlay) for the picture:
https://www.jcvignoli.com/pub/photo1.jpg
3/ When closing the first overlay, a second one has to be closed:
https://www.jcvignoli.com/pub/photo2.jpg
4/ My few style modifications are not responsible of the bug. I removed everything from the child theme’s style.css, but it didn’t change anything. Only removing the code in point 1 brings back OceanWP’s normal overlay’s behaviour with the pictures.Any idea?
The page I need help with: [log in to see the link]
- The topic ‘Bug: activation of child theme breaks overlay css for pictures’ is closed to new replies.