Skip to content

Instantly share code, notes, and snippets.

@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 );
@jamiemarsland
jamiemarsland / gist:3a13aca923f760954b075ea74684041d
Last active March 22, 2017 09:32
Fix for Post title not showing over featured image with Pootle Pagebuilder - add the following css to fix the issue
.full-image .ppb-post .ppb-blog-content {
z-index: 11;
}
.ppb-full-width-row.full-width-content {
padding: 0 !important;
}
@jamiemarsland
jamiemarsland / gist:4baca8664088025d5989
Created September 22, 2015 09:45
WooThemes Storefront fullscreen website CSS code
/* This sets the background image of the page. Just replace the page id and the url of the background image */
.page-id-43 {
background-image: url("http://176.32.230.250/storefront.com/wp-content/uploads/2015/09/record-shop.jpg");
background-size: cover;
}
/* This makes the header transparent so that the background image shows through */
.site-header {
@jamiemarsland
jamiemarsland / gist:5f7fc3bcafdbd6713945
Created September 18, 2015 03:47
Divi full screen css
/* First we have to make the main header transparent */
#main-header {
background-color: transparent;
}
/* Then we turn off the footer */
#main-footer {
display: none;
@jamiemarsland
jamiemarsland / gist:eae952d241ea165f242f
Last active August 29, 2015 14:15
Style Storefront Widgets
.widget-area .widget {
color: red;
font-size: 1em;
}
<button class="menu-toggle"><?php _e( 'Primary Menu', 'storefront' ); ?></button>
@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
}
@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">
add_action( 'init', 'jk_remove_storefront_header_search' );
function jk_remove_storefront_header_search() {
remove_action( 'storefront_header', 'storefront_product_search', 40 );
}