Skip to content

Instantly share code, notes, and snippets.

View psahalot's full-sized avatar

Puneet Sahalot psahalot

View GitHub Profile
@psahalot
psahalot / gist:2e2df59635ed2bdc5a08
Created December 2, 2015 16:39
Empty WooCommerce cart before adding new product
add_filter( 'woocommerce_add_cart_item_data', 'ps_empty_cart', 10, 3);
function ps_empty_cart( $cart_item_data, $product_id, $variation_id ) {
global $woocommerce;
$woocommerce->cart->empty_cart();
// Do nothing with the data and return
return $cart_item_data;
}
@psahalot
psahalot / cta-button-style.css
Created September 14, 2016 15:49
Call to Action Button in Header Menu - Beaver Builder Theme
/* Default button styling */
.fl-page-nav-wrap .navbar-nav > li.header-menu-cta > a {
color: #fff;
background: #2d94e3;
border: 1px solid #2d94e3;
border-radius: 5px;
}
/* Hover button styling */
.fl-page-nav-wrap .navbar-nav > li.header-menu-cta > a:hover {
@psahalot
psahalot / functions.php
Created October 4, 2016 05:36
Site Wide Modal / Popup Box
function beaveraddons_popup_box() {
echo do_shortcode('[fl_builder_insert_layout slug="site-wide-popup"]');
}
add_action('fl_after_content', 'beaveraddons_popup_box');
@psahalot
psahalot / form-style10.txt
Last active October 4, 2016 18:40 — forked from jainnidhi/form-style10.txt
Beaver Form Style 10
.form-style-10 {
background-image: url('https://wpbeaveraddons.com/wp-content/uploads/2016/06/demo-3.jpg');
background-repeat: no-repeat;
background-size: cover;
padding: 50px;
position: relative;
}
.form-style-10:before {
content: "";
@psahalot
psahalot / form-style8.txt
Created October 4, 2016 18:41 — forked from jainnidhi/form-style8.txt
Beaver Form Style 8
.form-style-8 {
background: #f52945;
padding: 50px
}
.form-style-8 .fl-input-group {
margin-bottom: 20px;
}
.form-style-8 .fl-input-group input,
.form-style-8 .fl-input-group textarea {
@psahalot
psahalot / form-style7.txt
Last active October 4, 2016 18:42 — forked from jainnidhi/form-style7.txt
Beaver Form Style 7
.form-style-7 {
background-image: url('https://wpbeaveraddons.com/wp-content/uploads/2016/07/explore-unsplash.jpg');
background-repeat: no-repeat;
background-size: cover;
padding: 50px;
position: relative;
}
.form-style-7:before {
content: "";
@psahalot
psahalot / subscribe-form1.css
Last active October 21, 2016 05:41 — forked from jainnidhi/subscribe-form1.txt
BB Subscribe Form 1
.subscribe-form-1 {
padding: 30px;
background: #1a1948;
}
.subscribe-form-1 a.fl-button {
box-shadow: 2px 2px 3px #4c9038;
}
.subscribe-form-1 .fl-form-field input {
@psahalot
psahalot / subscribe-form2.css
Created October 21, 2016 05:40 — forked from jainnidhi/subscribe-form2.txt
BB Subscribe Form 2
.subscribe-form-2 {
background: #c559bd;
padding: 40px 40px 30px;
}
.subscribe-form-2 .fl-form-field {
width: 38%;
display: inline-block;
}
@psahalot
psahalot / subscribe-form3.css
Created October 21, 2016 05:40 — forked from jainnidhi/subscribe-form3.txt
BB Subscribe Form 3
.subscribe-form-3 {
padding: 30px;
background: #efe46a;
}
.subscribe-form-3 .fl-form-field {
padding-right: 0 !important;
}
.subscribe-form-3 .fl-form-field input {
border: 1px solid #000;
background: transparent;
@psahalot
psahalot / subscribe-form5.css
Created October 21, 2016 05:40 — forked from jainnidhi/subscribe-form5.txt
BB Subscribe Form 5
.subscribe-form-5 {
padding: 30px;
background: #78f1da;
}
.subscribe-form-5 .fl-form-field {
width: 49.5%;
display: inline-block;
}