Skip to content

Instantly share code, notes, and snippets.

@SJ-James
SJ-James / facebook_warning.php
Created December 11, 2017 17:47
Facebook Browser Warning | Divi
<?php
if ( !function_exists( 'fb_browser_warning' ) ) {
function fb_browser_warning() {
?>
<style>
.fb_browser_warning {
position: relative;
background: #3B5998;
padding: 20px 20px 20px 80px;
@Garconis
Garconis / divi-logo-swap.js
Last active June 4, 2018 10:54
Divi | Swap/change the Divi header logo on fixed header (After Scroll)
(function($) {
$(window).on('scroll', function() {
if(jQuery('#main-header').hasClass("et-fixed-header")) {
jQuery('#logo').attr('src','/wp-content/uploads/logo-alt.png');
}
else {
jQuery('#logo').attr('src','/wp-content/uploads/logo.png');
}
});
})( jQuery );
@Garconis
Garconis / divi-mobile-submenu-toggles.css
Last active April 3, 2023 10:02
Divi | WordPress Theme | Mobile Menu Collapsible Submenus via Toggles | CSS & jQuery Tweaks in action: https://i.gyazo.com/93557e9ef5d4aad260e22c6d5896de3b.mp4
/* -- HEADER -- */
/* remove pointer event from menu module mobile wrapper */
.et_pb_module.et_pb_menu .et_mobile_nav_menu {
pointer-events: none;
}
/* make menu module hamburger icon and menu links interactive again */
.et_pb_module.et_pb_menu .et_mobile_nav_menu .mobile_menu_bar,
.et_pb_module.et_pb_menu .et_mobile_nav_menu .et_mobile_menu li a {
@lots0logs
lots0logs / child-theme-functions-php-snippet.php
Last active July 19, 2018 11:29
WordPress :: Divi Theme :: Enable Pinch-To-Zoom
function my_et_add_viewport_meta(){
echo '<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=1" />';
}
add_action( 'wp_head', 'my_et_add_viewport_meta' , 11 );
function my_et_add_viewport_meta_disable() {
remove_action( 'wp_head', 'et_add_viewport_meta' );
}
add_action( 'after_setup_theme', 'my_et_add_viewport_meta_disabled', 50 );
@olexpono
olexpono / Custom.css
Last active February 14, 2023 15:44
Crate -- a Dark gray/orange Theme for Chrome DevTools
/**********************************************/
/*
/*
/* Crate -- Theme for Chrome DevTools
/* Last Update :: September 2013
/*
/* based on:
/* mnml by Michael P. Pfeiffer
/* Based on a Gist by Ben Truyman. Further attr:
/* https://gist.github.com/3040634