Skip to content

Instantly share code, notes, and snippets.

View skyshab's full-sized avatar

Sky Shabatura skyshab

  • taproot studios
  • Fayetteville, AR
View GitHub Profile
@skyshab
skyshab / set.less
Last active August 29, 2015 13:56
Less mixin to set rules conditionally
.set(@property: null; @then: null; ) when not (@property = null ) and not ( @then = null )
{
@{property}: @then;
}
.set( @property: null; @then: null; @when: null; )
{
#check.condition( @when ); .output();
.output() when (@condition) {
@skyshab
skyshab / divi-mod-example.php
Created December 4, 2015 15:55
Quick and dirty proof of concept for enabling sidebar area on pages that use Divi Builder
<?php
function et_pb_is_pagebuilder_used( $page_id ) {
return false;
}
add_action( 'admin_head', 'add_my_admin_styles' );
function add_my_admin_styles() {
echo '<style>.et_pb_page_layout_settings { display: block!important;}</style>';
}
@skyshab
skyshab / example full width header badges
Created August 11, 2016 13:05
This code should go in the content editor inside your fullwidth header module.
<div class="et_pb_text_align_center" style="margin-top: 24px;">
<p>TRUSTED BY SOME OF THE BIGGEST NAMES AROUND THE WORLD</p>
<img src="/wp-content/uploads/2016/04/rvb-client-logos.png" alt="">
</div>
@skyshab
skyshab / functions.php
Created August 12, 2016 19:37
Add filter for Divi image sizes
add_filter('et_theme_image_sizes', 'return_my_image_sizes');
function return_my_image_sizes( $sizes )
{
$image_sizes = array(
'400x250' => 'et-pb-post-main-image',
'1080x675' => 'et-pb-post-main-image-fullwidth',
'400x284' => 'et-pb-portfolio-image',
'510x382' => 'et-pb-portfolio-module-image',
'1080x9999' => 'et-pb-portfolio-image-single',
@skyshab
skyshab / functions.php
Created August 12, 2016 20:22
filter featured image width and height
add_filter( 'et_pb_index_blog_image_width', 'featured_image_width_filter', 100 );
function featured_image_width_filter( $val )
{
// single page featured image
if ( is_single() )
{
return 625;
}
// post box image in blog feed
@skyshab
skyshab / example.css
Last active August 14, 2016 15:49
adjusting menu padding
@media only screen and (min-width: 981px){
/* set top padding on nav */
.et_header_style_left #et-top-navigation {
padding-top: 75px!important;
}
/* set bottom padding on nav item links */
.et_header_style_left #et-top-navigation nav > ul > li > a {
@skyshab
skyshab / example.css
Last active August 16, 2016 23:51
Replace #my-form-id with the unique id of your form
#my-form-id input[type=radio] {
position: absolute;
opacity: 0;
cursor: pointer;
}
#my-form-id input[type=radio] + .wpcf7-list-item-label:before {
content: "V";
display: inline-block;
padding-right: 5px;
@skyshab
skyshab / default-template.php
Created August 23, 2016 15:42
Custom code I used to integrate The Event Calendar with Divi
<?php
/**
* Custom Events Template
* This file is the basic wrapper template for all the views if 'Default Events Template'
* is selected in Events -> Settings -> Template -> Events Template.
*
* Override this template in your own theme by placing this file at [your-theme]/tribe-events/default-template.php
*
* @package TribeEventsCalendar
*
<h2 class="et_pb_slide_title"><span class="listing-price">$44</span>Subconscious<br>
Healing Shakti</h2>
// CSS
h2 {
line-height: 1.2em
}
h2 span {
.et_pb_contact_form_label ::-webkit-input-placeholder { /* Chrome/Opera/Safari */
display:none!important;
}
.et_pb_contact_form_label ::-moz-placeholder { /* Firefox 19+ */
display:none!important;
}
.et_pb_contact_form_label :-ms-input-placeholder { /* IE 10+ */
display:none!important;
}
.et_pb_contact_form_label :-moz-placeholder { /* Firefox 18- */