Skip to content

Instantly share code, notes, and snippets.

View tuanbbhero's full-sized avatar

Tuan Phan tuanbbhero

View GitHub Profile
/* CSS by BeaverHero.com */
/* Insert to Appearance > Customize > Additional CSS (Custom CSS) OR Layout CSS & JavaScript > CSS */
/* Detail: https://beaverhero.com/search-widget-module-css-bb */
/* 1. SEARCH FIELD */
.widget .search-field {
background-color: grey;
font-size: 25px;
font-family: Roboto, sans-serif;
text-transform: uppercase;
add_filter( 'woocommerce_product_description_heading', '__return_null' );
add_action( 'woocommerce_thankyou', 'kl_gg_analytics_thank_you_page' );
function kl_gg_analytics_thank_you_page() {
?>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-107909516-7"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
@tuanbbhero
tuanbbhero / Add to Cart Button Color - WooCommerce
Created March 11, 2019 01:50
Customize Add to Cart Button: Color, Background Color
/* You can use Color Name: red green white, or Color Code: #fff #222 #f8f8f8 */
/* 1. ADD TO CART ON PRODUCT PAGE */
.single-product form.cart .button {
color: green;
background-color: white;
border-color: red;
border-width: 1px;
border-style: solid;
}
.single-product form.cart .button:hover {
add_filter('use_block_editor_for_post', '__return_false');
/* Caldera Forms Styling - All Fields */
/* Explaination
+ CF5c77563fa2a64 is Form ID. It is also CSS Class
+ Insert these CSS into Appearance > Customize > Custom CSS (or Additional CSS)
+ Don't insert into Style.css
*/
/* I. Basic Fields */
/* 1. Single Line Text */
.CF5c77563fa2a64 input[type="text"] {
background: #ccc;
add_action( 'woocommerce_thankyou', 'bbloomer_add_content_thankyou' );
function bbloomer_add_content_thankyou() {
echo '<h2 class="h2thanks">Get 20% off</h2><p class="pthanks">Thank you for making this purchase! Come back and use the code "<strong>Back4More</strong>" to receive a 20% discount on your next purchase!</p>';
}
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
/* For StoreFront Theme */
add_action( 'init', 'bbloomer_delay_remove_result_count' );
function bbloomer_delay_remove_result_count() {
remove_action( 'woocommerce_after_shop_loop', 'woocommerce_result_count', 20 );
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
}
add_filter( 'woocommerce_subcategory_count_html', '__return_null' );
@tuanbbhero
tuanbbhero / Rename Description Tab
Created February 27, 2019 23:21
Rename Description Tab in WooCommerce Product Page
add_filter( 'woocommerce_product_description_tab_title', 'bbloomer_rename_description_product_tab_label' );
function bbloomer_rename_description_product_tab_label() {
return 'New Name';
}