Skip to content

Instantly share code, notes, and snippets.

@jamiemarsland
jamiemarsland / gist:640aebdeb7e6ed8826bfba114cda8bf0
Created March 19, 2018 19:03
Ipad menu fix for Ipad Portrait mode
@media (max-width:768px){
.storefront-pro-active #masthead .primary-navigation {
display: inline-block;
}
}
@jamiemarsland
jamiemarsland / storefront pro mega menu
Created March 5, 2018 10:49
How to increase the number of columns in storefront pro mega menu
#site-navigation .primary-navigation li.mega-menu>ul>li {
width: 20%;
}
@jamiemarsland
jamiemarsland / gist:5b25f613e79c09c00a2dced3c1544359
Created October 4, 2017 09:50
Increase size of WooCommerce Storefront Pro logo
#masthead .site-logo-link img {
max-width: none;
}
@jamiemarsland
jamiemarsland / gist:565930202f6c6c61a4681071246637ce
Created September 14, 2017 10:39
Storefront Pro mega menu alignment issue (when using align right, items right layout in Primary Navigation
.sfp-nav-styleright #site-navigation .primary-navigation li.mega-menu ul.sub-menu {
width: 1150px;
max-width: calc( 100vw - 45px );
}
.storefront-pro-active .col-full {
max-width: 1150px;
}
@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' );
@jamiemarsland
jamiemarsland / gist:a04d8c0215db374534ad2b2ecdc0e62f
Created August 7, 2017 07:46
Avada theme Pootle pagebuilder icon not showing fix
​div#pootlepb-modules-wrap {
z-index: 99999;
}
@jamiemarsland
jamiemarsland / gist:07b01dfe1019e521aeda15504471209c
Created June 8, 2017 13:39
WooCommerce tiles fix (for Storefront Pro)
.storefront-pro-active .site ul.products .product-grid-item {
padding-top: 70%;
}
@jamiemarsland
jamiemarsland / gist:c7bcec002f3dc440a3a2628f91b294b3
Created March 30, 2017 13:03
How to add links to colored tiles in Pootle Pagebuilder
<a href="http://example.com" class="fill-parent-link">.</a>
@jamiemarsland
jamiemarsland / gist:33f4fc7a48c1a991633eb97a5632a403
Last active January 16, 2019 09:24
How to add a hover effect to Pootle Pagebuilder content areas
.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);
@jamiemarsland
jamiemarsland / gist:c82f1489ce572d614cf206deb87f854a
Last active March 29, 2017 07:19
Add a read more link to the excerpt in blog posts when using pootle pagebuilder pro
add_filter( 'get_the_excerpt', function( $excerpt ) {
return
substr( $excerpt, 0, 230 ) .
' <a class="more" href="' . get_the_permalink() . '">More</a>';
}, 9999 );