Skip to content

Instantly share code, notes, and snippets.

@RiaanKnoetze
RiaanKnoetze / style.css
Created May 2, 2017 03:32
Change main navigation icon in mobile view when using Storefront theme
body .main-navigation ul li a:before {
content: "\f192";
}
@RiaanKnoetze
RiaanKnoetze / style.css
Created April 26, 2017 07:06
Hide category and product titles on the homepage when using the Toyshop child theme for Storefront
.home ul.products li.product-category .toyshop-product-title,
.home ul.products li.product .toyshop-product-title h2,
.home ul.products li.product .toyshop-product-title .woocommerce-loop-product__title{
display: none;
}
@RiaanKnoetze
RiaanKnoetze / functions.php
Created April 24, 2017 09:01
Remove zoom and lightbox in WooCommerce 3.0
add_action( 'after_setup_theme', 'custom_woocommerce_support' );
function custom_woocommerce_support() {
remove_theme_support( 'wc-product-gallery-zoom' );
remove_theme_support( 'wc-product-gallery-lightbox' );
}
@RiaanKnoetze
RiaanKnoetze / style.css
Created April 24, 2017 03:45
Remove header cart section from the menu when using Scrollider theme
#header .mini-cart {
display: none;
}
@RiaanKnoetze
RiaanKnoetze / styles.css
Created April 19, 2017 19:33
Force search section on Homestore child theme for Storefront to be right-aligned in relation to other header elements
@media screen and (min-width: 768px) {
.woocommerce-active .site-header .site-header-cart {
right: 2.617924em;
}
}
@RiaanKnoetze
RiaanKnoetze / style.css
Created April 19, 2017 04:21
Hide the fall/winter/summer forest used in the Toyshop child theme for Storefront
.forest {
display: none;
}
@RiaanKnoetze
RiaanKnoetze / style.css
Created April 17, 2017 20:26
Hide grouped product listing on the single product page when using WooCommerce.
.woocommerce.single-product .group_table {
display: none;
}
@RiaanKnoetze
RiaanKnoetze / functions.php
Created April 11, 2017 07:50
Storefront change categories to be ordered by date.
/**
* Alters the output of the homepage product categories on the Storefront theme
* Affects the storefront_product_categories_args filter in /inc/structure/template-tags.php
*/
function rk_display_four_home_product_categories( $args ) {
// Sets the categories to be ordered by date, instead of name
$args['orderby'] = 'date';
@RiaanKnoetze
RiaanKnoetze / functions.php
Created April 7, 2017 10:29
Increase number of categories shown on homepage when using Storefront (works with/without Storefront Powerpack)
add_filter( 'storefront_product_categories_args', 'wc_ninja_swc_homepage_category_limit', 25 );
function wc_ninja_swc_homepage_category_limit() {
return 20;
}
@RiaanKnoetze
RiaanKnoetze / style.css
Created April 4, 2017 06:36
Remove semi transparent background on header section when using the Galleria child theme
body #masthead:after {
background: none;
}