Skip to content

Instantly share code, notes, and snippets.

@robhob
robhob / newtab.js
Last active January 10, 2017 11:58
Open the Divi Fullwidth Header module’s first button (Button #1) in a new tab.
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery(".et_pb_more_button.et_pb_button.et_pb_button_one").attr('target', '_blank');});
</script>
@robhob
robhob / tiledbackground.css
Last active January 10, 2017 12:03
Tile the background of a Divi Section
background-repeat: repeat;
background-size: initial;
background-image:url(http://yoursite.com/wp-content/uploads/thetile.png);
@robhob
robhob / h1.css
Created January 10, 2017 12:05
Adding Google Fonts to a Divi Website
h1 {
font-family: 'Fjalla One', sans-serif;
}
@robhob
robhob / functions.php
Created January 11, 2017 11:19
TGM Plugin Activation Step 1
/* TGM Plugin activation */
require_once get_stylesheet_directory() . '/inc/tgm_pa.php';
require_once get_stylesheet_directory() . '/path/to/class-tgm-plugin-activation.php';
require_once dirname( __FILE__ ) . '/class-tgm-plugin-activation.php';
array(
'name' => 'Jetpack by WordPress.com',
'slug' => 'jetpack',
'required' => false,
),
/* Increase width of vertical navigation */
@media (min-width: 981px) {
.et_vertical_nav #page-container #main-header{
width:18%;
}
.et_vertical_nav #et-main-area, .et_vertical_nav #top-header{
margin-left:18% !important;
}
}
/* Switch to hamburger menu on tablets */
@media only screen and ( max-width:1024px) {
#et_mobile_nav_menu {
display: block;
}
#top-menu-nav {
display: none;
}
.et_header_style_left .mobile_menu_bar {
content: "";
background: url('/wp-content/uploads/2017/05/tex2.png') repeat;
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
z-index: 2;