Skip to content

Instantly share code, notes, and snippets.

html {
scroll-behavior: smooth;
}
@jamiemarsland
jamiemarsland / gist:5ee8f104bc6b19ca8e14d1414549c508
Created August 10, 2017 04:15
Change the WooCommerce 'return to shop' button link (with thanks to Nicola Mustone)
/**
* 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' );
.wp-block-navigation .wp-block-navigation-item__label:hover {
background-color: #CE4520;
border-radius: 25px;
color:white;
}
.wp-block-navigation .wp-block-navigation-item__label {
padding:10px;
}
html {
scroll-snap-type: y mandatory;
scroll-behavior: smooth;
}
.scroller {
scroll-snap-align: start;
}
@jamiemarsland
jamiemarsland / gist:f27cb41835286e8045f3bfe4ac8947b7
Created October 13, 2022 18:25
Add Background image to Gutenberg Columns Block
.shorts {
background-image: url('https://woo.us2.instawp.xyz/wp-content/uploads/2020/09/product-w-jeans1.jpg');
background-color: #cccccc; /* Used if the image is unavailable */
height: 500px; /* You must set a specified height */
background-position: center; /* Center the image */
background-repeat: no-repeat; /* Do not repeat the image */
background-size: cover; /* Resize the background image to cover the entire container */
}
@jamiemarsland
jamiemarsland / gist:dfa1f1a1e19e92e4e450bcbf9b2af91d
Last active October 13, 2022 18:24
Reverse Gutenberg Columns on Mobile (use 'reverse-mobile' as class for Column)
@media (max-width: 768px) {
.reverse-mobile {
flex-direction: column-reverse;
}
}
@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">
.wp-block-image
{
border-radius: 76% 24% 67% 33% / 30% 30% 70% 70% ;
}
.wp-block-image:nth-child(2)
{
border-radius: 56% 44% 66% 34% / 52% 50% 50% 48%
}
.roundedpics {
border-radius: 25px;
}
@jamiemarsland
jamiemarsland / gist:fc53718a7e062ee3c81f26503d3a38c7
Created June 28, 2021 14:50
CSS to fix image in column to bottom of Cover Block
.wp-block-cover.alignfull,
.wp-block-columns {
margin-bottom: 0;
padding-bottom: 0;
}