Skip to content

Instantly share code, notes, and snippets.

@jamiemarsland
jamiemarsland / gist:5a4bd9641244b809c4a0
Created Feb 18, 2015
WooThemes Storefront change color of horizontal lines on homepage
View gist:5a4bd9641244b809c4a0
.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 Feb 18, 2015
How to customize to WooThemes Storefront Sale Button
View gist:cb8a7289bb971ad9ccdb
.onsale {
background-color: #FFFFFF;
border-color: #FF0000;
color: #FF0000;
}
@jamiemarsland
jamiemarsland / gist:e9909953b13ddd693cc1
Created Feb 18, 2015
Move the Storefront sale badge below the product picture
View gist:e9909953b13ddd693cc1
ul.products li.product .onsale {
position: absolute;
top: 137px;
right: 62px;
}
@jamiemarsland
jamiemarsland / gist:ee5b8eb0aca2f948dabe
Created Feb 18, 2015
How to Change the logo, secondary navigation and search bar size for WooThemes Storefont
View gist:ee5b8eb0aca2f948dabe
@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 Feb 18, 2015
Make WooThemes Storefront product pages full width
View gist:3835778210966604defa
add_action( 'get_header', 'remove_storefront_sidebar' );
if ( is_product() ) {
remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
}
}
@jamiemarsland
jamiemarsland / gist:efffcec4d44464f03377
Created Feb 18, 2015
css for storefront product pages
View gist:efffcec4d44464f03377
body.woocommerce #primary { width: 100%; }
@jamiemarsland
jamiemarsland / gist:6f279aa9975c9121262b
Created Feb 18, 2015
Make meta slider full width for storefront
View gist:6f279aa9975c9121262b
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
@jamiemarsland
jamiemarsland / gist:5e618baeda2dd5199d4a
Created Feb 18, 2015
Remove WooThemes credit in Storefront footer
View gist:5e618baeda2dd5199d4a
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 Feb 18, 2015
Rename Navigation in mobile menu for Storefront
View gist:b0a4511aaaef67876ee6
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
}