Skip to content

Instantly share code, notes, and snippets.

@jamiemarsland
jamiemarsland / gist:5a4bd9641244b809c4a0
Created February 18, 2015 05:33
WooThemes Storefront change color of horizontal lines on homepage
.page-template-template-homepage .hentry .entry-header,
.page-template-template-homepage .hentry,
.page-template-template-homepage .storefront-product-section {
border-color: red;
}
@jamiemarsland
jamiemarsland / gist:cb8a7289bb971ad9ccdb
Created February 18, 2015 05:39
How to customize to WooThemes Storefront Sale Button
.onsale {
background-color: #FFFFFF;
border-color: #FF0000;
color: #FF0000;
}
@jamiemarsland
jamiemarsland / gist:e9909953b13ddd693cc1
Created February 18, 2015 05:41
Move the Storefront sale badge below the product picture
ul.products li.product .onsale {
position: absolute;
top: 137px;
right: 62px;
}
@jamiemarsland
jamiemarsland / gist:ee5b8eb0aca2f948dabe
Created February 18, 2015 05:43
How to Change the logo, secondary navigation and search bar size for WooThemes Storefont
@media screen and (min-width: 768px) {
/* LOGO */
.site-header .site-branding, .site-header .site-logo-anchor, .site-header .site-logo-link { width: 30% !important; /* Use px values if you want, eg. 350px */ }
/* SECONDARY NAVIGATION */
.site-header .secondary-navigation { width: 40% !important; /* Use px values if you want, eg. 350px */ }
/* SEARCH BAR */
.site-header .site-search { width: 30% !important; /* Use px values if you want, eg. 350px */ }
}
@jamiemarsland
jamiemarsland / gist:3835778210966604defa
Created February 18, 2015 05:48
Make WooThemes Storefront product pages full width
add_action( 'get_header', 'remove_storefront_sidebar' );
if ( is_product() ) {
remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
}
}
@jamiemarsland
jamiemarsland / gist:efffcec4d44464f03377
Created February 18, 2015 05:48
css for storefront product pages
body.woocommerce #primary { width: 100%; }
@jamiemarsland
jamiemarsland / gist:6f279aa9975c9121262b
Created February 18, 2015 06:00
Make meta slider full width for storefront
add_action( 'init', 'child_theme_init' );
function child_theme_init() {
add_action( 'storefront_before_content', 'woa_add_full_slider', 5 );
}
function woa_add_full_slider() { ?>
<div id="slider">
<?php echo do_shortcode("[metaslider id=388 percentwidth=100]"); ?>
</div>
<?php
add_action( 'init', 'jk_remove_storefront_header_search' );
function jk_remove_storefront_header_search() {
remove_action( 'storefront_header', 'storefront_product_search', 40 );
}
@jamiemarsland
jamiemarsland / gist:5e618baeda2dd5199d4a
Created February 18, 2015 06:11
Remove WooThemes credit in Storefront footer
add_action( 'init', 'custom_remove_footer_credit', 10 );
function custom_remove_footer_credit () {
remove_action( 'storefront_footer', 'storefront_credit', 20 );
add_action( 'storefront_footer', 'custom_storefront_credit', 20 );
}
function custom_storefront_credit() {
?>
<div class="site-info">
@jamiemarsland
jamiemarsland / gist:b0a4511aaaef67876ee6
Created February 18, 2015 06:16
Rename Navigation in mobile menu for Storefront
function storefront_primary_navigation() {
?>
<nav id="site-navigation" class="main-navigation" role="navigation">
<button class="menu-toggle"><?php _e( 'Primary Menu', 'storefront' ); ?></button>
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav><!-- #site-navigation -->
<?php
}