Skip to content

Instantly share code, notes, and snippets.

View lelandf's full-sized avatar

Leland Fiegel lelandf

View GitHub Profile
@lelandf
lelandf / gravityforms-disable-notifications.php
Created March 19, 2015 16:14
This snippet will disable all Gravity Forms notifications. It is designed to be dropped into a mu-plugins file or theme's functions file. You probably don't need this but it might come in handy for something.
<?php
add_filter( 'gform_notification', 'leland_disable_gf_notifications', 10, 3 );
function leland_disable_gf_notifications( $notification, $form, $entry ) {
$notification = '';
return $notification;
}
?>
@lelandf
lelandf / simple-pink-button.css
Created March 1, 2016 21:49
Simple pink button
.dislodged-border {
background: #FB3FDE;
border-radius: 30px;
color: #fff;
display: inline-block;
font-family: sans-serif;
padding: 15px 20px 14px;
text-decoration: none;
}
@lelandf
lelandf / dislodged-border-button.css
Created March 1, 2016 22:04
Dislodged border button CSS
.dislodged-border {
background: #FB3FDE;
border-radius: 30px;
color: #fff;
display: inline-block;
font-family: sans-serif;
padding: 15px 20px 14px;
position: relative;
text-decoration: none;
}
.widget_recent_entries .widget-title,
.widget_recent_entries ul {
line-height: 48px; /* Height of the news ticker, with text vertically centered */
}
.main-navigation {
margin-top: 48px; /* This should equal the height of the news ticker (48px, set above) */
}
.widget_recent_entries {
/* Summon our "marquee" animation and spread it out over 50 seconds, repeating it forever */
.widget_recent_entries ul {
animation: marquee 50s linear infinite;
}
/* Create our "marquee" animation to move the text from right to left */
@keyframes marquee {
0% { transform: translate(100%, 0); }
100% { transform: translate(-100%, 0); }
}
/* Stop scrolling on hover */
.widget_recent_entries ul:hover {
animation-play-state: paused;
}
.pingback {
margin-bottom: 3em;
position: relative;
}
.pingback .comment-content p {
margin: -1em 0 3em;
}
.pingback .comment-content {
<?php
function automatic_column_layouts_body_classes( $classes ) {
// Adds a class of no-sidebar if the sidebar-1 widget area is not active.
if ( ! is_active_sidebar( 'sidebar-1' ) ) {
$classes[] = 'no-sidebar';
}
return $classes;
}
add_filter( 'body_class', 'automatic_column_layouts_body_classes' );
.content-area {
float: left;
width: 70%;
}
.widget-area {
float: right;
width: 30%;
}
.no-sidebar .content-area {
float: none;
width: 100%;
}