Skip to content

Instantly share code, notes, and snippets.

@timskye
timskye / gist:8433683
Created January 15, 2014 09:59
Vertical align an element using CSS
/** Vertical Align element **/
.element {
position: relative;
top: 50%;
transform: translateY(-50%);
}
@timskye
timskye / gist:8281011
Last active January 2, 2016 09:09
Remove Woocommerce product data tabs from product page layout
/** Remove Woocommerce product data tabs from product page layout **/
add_filter( 'woocommerce_product_tabs', 'thdwoo_remove_product_tabs', 98 );
function thdwoo_remove_product_tabs( $tabs ) {
unset( $tabs['description'] ); // Remove the description tab
unset( $tabs['reviews'] ); // Remove the reviews tab
unset( $tabs['additional_information'] ); // Remove the additional information tab
return $tabs;
}
@timskye
timskye / gist:7767717
Created December 3, 2013 11:31
This removes post meta info from a post in Genesis
//* Remove the post meta function
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
@timskye
timskye / gist:7647794
Created November 25, 2013 19:59
This adds a body class to all pages on the site, and should be placed in functions.php in Genesis framework
//* Add custom body class to the head
add_filter( 'body_class', 'hd_body_class' );
function hd_body_class( $classes ) {
$classes[] = 'my-custom-class';
return $classes;
}
@timskye
timskye / gist:7607421
Created November 22, 2013 21:46
Remove the edit link in Genesis framework. This should be placed in your functions.php file
// Remove the edit link
add_filter ( 'genesis_edit_post_link' , '__return_false' );
@timskye
timskye / gist:7607399
Created November 22, 2013 21:44
How to create a category specific Blog page in Genesis
Custom field name should be > query_args
Custom field value shoud be > cat=x (where x is the category ID)