Skip to content

Instantly share code, notes, and snippets.

View dannydickson's full-sized avatar

Danny D. dannydickson

View GitHub Profile
@dannydickson
dannydickson / material-button.css
Created February 20, 2017 03:28
Material Button CSS
.button {
box-shadow: 0 2px 2px 0 rgba(244,67,54,0.14), 0 3px 1px -2px rgba(244,67,54,0.2), 0 1px 5px 0 rgba(244,67,54,0.12);
}
.button::hover {
box-shadow: 0 14px 26px -12px rgba(244,67,54,0.42), 0 4px 23px 0px rgba(0,0,0,0.12), 0 8px 10px -5px rgba(244,67,54,0.2);
}
@dannydickson
dannydickson / wp-iframe-enable.php
Last active May 19, 2017 05:26
Add iFrame to WordPress Widgets
<?php
/* Do not inlude the first 4 lines of this code. Only copy the code below this line. This should be
placed in your main functions.php to enable this globally, or on specific page templates */
//* Allow shortcodes to execute in widget areas
add_filter('widget_text', 'do_shortcode');
// Register function to allow shortcodes
function add_iframe($atts) {
extract(shortcode_atts(array(
@dannydickson
dannydickson / fa-button-example.html
Created July 7, 2017 15:35
Font awesome social media button examples with links
<a href="#"><i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-facebook fa-stack-1x"></i></a>
<a href="#"><i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-youtube fa-stack-1x"></i> </a>
<a href="#"><i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-linkedin fa-stack-1x"></i></a>
<a href="#"><i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-twitter fa-stack-1x"></i> </a>
<a href="#"><i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-google-plus fa-stack-1x"></i></a>
@dannydickson
dannydickson / material-hover.css
Last active July 17, 2018 20:21
Material Hover Effect
.div {
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
transition: box-shadow 0.3s ease-in-out;
}
.div:hover {
box-shadow: 0 0px 30px rgba(13,115,142,0.2);
}
@dannydickson
dannydickson / image-grid-overlay.css
Last active December 12, 2017 15:39
Adds a full-width Image grid with cool hover effect to Divi.
.image-overlay {
background-color:rgba(0,0,0, 0.7);
position:absolute;
height:100%;
width:100%;
opacity: 1;
transition:opacity 1s;
}
.image-overlay-wrapper .et_pb_button {
@dannydickson
dannydickson / add-subnav-class.html
Last active August 23, 2017 20:32
Add class to each sub-nav in Divi for separate styling. (add this code to Divi > Theme Options > Integrations > Body scripts. This will add a class to each individual sub nav (ie "sub-nav-1", "sub-nav-2" and so on). These new classes can now be styled individually to target the border-color, or anything else you want.
<script type="text/javascript">
jQuery(document).ready(function($) {
$( ".menu-item-has-children .sub-menu" ).addClass(function( index ) {
return "sub-nav-" + index;
});
})
</script>
@dannydickson
dannydickson / image-grid-overlay.css
Created August 23, 2017 20:23
Adds a full-width Image grid with cool hover effect to Divi.
/* Animated Overlay */
.image-overlay-wrapper {
height:500px;
}
.image-overlay {
background-color:rgba(0,0,0, 0.7);
position:absolute;
height:100%;
width:100%;
@dannydickson
dannydickson / wp-jquery-starter.js
Created November 21, 2017 18:25
WordPress jQuery Starter - Add jQuery to WordPress
<script>
(function($) {
// Insert your jQuery here
})( jQuery );
</script>
@dannydickson
dannydickson / divi-slider-jake.css
Last active December 12, 2017 15:23
Divi Slider with bottom aligned overlay
/*----------------------------
Slider Customization
created by: Jake Smith
----------------------------*/
/* Blue box sizing and spacing */
/* Entire Slider */
#cm-slider .et_pb_slider {
}
@dannydickson
dannydickson / update-text-divi-mobile-menu.php
Last active March 1, 2018 17:58
Update "Select Page" Text Divi Mobile Menu
<?php
/* Place the code below in your functions.php file. Do Not Include the opening PHP tag above. In the code, look for the "return" and change the word 'Menu' inside the quotation marks to what ever you want to show up in the mobile menu */
// Update "Select Page" Mobile Menu Text
add_filter('gettext', 'change_select_page_text', 20, 3);
function change_select_page_text($text, $orig, $domain ) {
if ($domain == 'Divi' and $orig == 'Select Page') { return 'Menu'; }
return $text;
}