Skip to content

Instantly share code, notes, and snippets.

@RiaanKnoetze
RiaanKnoetze / gist:e445fc2b429f8906fbb0905695ba1c2d
Created June 28, 2016 04:17
PDF Product Vouchers Field CSS Changes
.voucher-fields input[type='text'], .voucher-fields input[type='email'], .voucher-fields textarea {
background: #000;
border: none;
color: #fff;
}
ul.brands {
float: left;
width: 95%;
padding: 0.5em 0 1.5em;
min-height: 75px;
border-bottom: 3px double #ccc;
}
ul.brands li {
float: left;
@RiaanKnoetze
RiaanKnoetze / functions.php
Created August 15, 2016 08:15
Remove "Archives" from title when using WooThemes Canvas and the Testimonials by WooThemes plugin
function new_testimonial_title( $new_title ) {
// Make sure we limit this to the Testimonials post type
if ( 'testimonial' == get_post_type() ) {
$post_type_object = get_post_type_object( get_query_var( 'post_type' ) );
$title = $post_type_object->labels->name;
return $title;
}
}
add_filter( 'get_the_archive_title', 'new_testimonial_title' );
@RiaanKnoetze
RiaanKnoetze / style.css
Created August 17, 2016 07:36
Hide the "Downloads" menu item in WooCommerce on the "My Account" page
.woocommerce-account .woocommerce-MyAccount-navigation-link--downloads {
display: none;
}
@RiaanKnoetze
RiaanKnoetze / style.css
Created August 18, 2016 05:11
Optimise WooCommerce cart display for Product Add-ons or products using custom option forms
.shop_table dl.variation dt {
margin-right: 5px;
float: left;
padding-top: 0.5em;
}
.shop_table dl.variation dd {
margin-right: 10px;
display: block;
clear: both;
@RiaanKnoetze
RiaanKnoetze / style.css
Created August 22, 2016 08:51
Hide Stripe credit card thumbnails that's unavailable in a given country
/* Hide WooCommerce Stripe credit card thumbnails that's unavailable in Australia */
.woocommerce-checkout img[src*="discover"],
.woocommerce-checkout img[src*="jcb"],
.woocommerce-checkout img[src*="diner"] {
display: none;
}
@RiaanKnoetze
RiaanKnoetze / style.css
Created August 24, 2016 04:15
Change sub category link colours when using Storefront Mega Menus
.main-navigation ul li.smm-active ul.sub-menu li a:not(.button) {
color: red;
}
.main-navigation ul li.smm-active ul.sub-menu li .sub-menu a:not(.button) {
color: blue;
}
@RiaanKnoetze
RiaanKnoetze / style.css
Created August 24, 2016 06:29
Adjust star rating letter spacing for Peddlar in IE
.star-rating:before,
.star-rating span:before{
letter-spacing: inherit !important;
}
@RiaanKnoetze
RiaanKnoetze / functions.php
Created August 24, 2016 08:17
Show search section from "Product Search" extension in Storefront header
// Hide native search bar
remove_action( 'storefront_header', 'storefront_product_search', 40 );
// Show "Product Search" search bar
add_action( 'storefront_header', 'storefront_predictive_search', 40 );
function storefront_predictive_search() {
echo do_shortcode('[woocommerce_product_search]');
}
@RiaanKnoetze
RiaanKnoetze / style.css
Created August 29, 2016 04:57
Increase size of PayPal logo in WooCommerce checkout page
#payment .payment_methods .payment_method_paypal li img {
width: 319px;
height: 110px;
max-height: 110px;
}