Skip to content

Instantly share code, notes, and snippets.

@jamiemarsland
jamiemarsland / gist:5ee8f104bc6b19ca8e14d1414549c508
Created Aug 10, 2017
Change the WooCommerce 'return to shop' button link (with thanks to Nicola Mustone)
View gist:5ee8f104bc6b19ca8e14d1414549c508
/**
* Changes the redirect URL for the Return To Shop button in the cart.
*
* @return string
*/
function wc_empty_cart_redirect_url() {
return 'http://yourdomain.com/your-page/';
}
add_filter( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url' );
@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
}
@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:235dbde69d694c8ec81c097867ca138a
Created Jun 1, 2020
Remove storefront header but keep the menu
View gist:235dbde69d694c8ec81c097867ca138a
#masthead &gt; .col-full,
#masthead .site-header-cart {
display: none;
}
View gist:202ffb3019359816c8e4f28f4e460ac0
/*** Take out the divider line between content and sidebar ***/
#main-content .container:before {background: none;}
/*** Hide Sidebar ***/
#sidebar {display:none;}
/*** Expand the content area to fullwidth ***/
@media (min-width: 981px){
#left-area {
width: 100%;
@jamiemarsland
jamiemarsland / gist:fb804a1410728cf143bfafcd1756658f
Created May 13, 2019
Remove WooCommerce Storefront feature image from posts
View gist:fb804a1410728cf143bfafcd1756658f
remove_action( 'storefront_post_content_before', 'storefront_post_thumbnail', 10 );
@jamiemarsland
jamiemarsland / gist:cd99b279ce10c2b891ab2c5c56c71158
Created Mar 18, 2019
Remove underlines from Storefront hyperlinks
View gist:cd99b279ce10c2b891ab2c5c56c71158
a {
text-decoration: none !important;
}
@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:33f4fc7a48c1a991633eb97a5632a403
Last active Jan 16, 2019
How to add a hover effect to Pootle Pagebuilder content areas
View gist:33f4fc7a48c1a991633eb97a5632a403
.ppb-hover-card .ppb-block {
position: relative;
}
.ppb-hover-card .ppb-block > * {
position: static;
}
.ppb-hover-card .ppb-block a.fill-parent-link {
display: block;
content: '';
background: rgba(0,0,0,0);