Skip to content

Instantly share code, notes, and snippets.

View woogist's full-sized avatar

WooCommerce.com Documentation woogist

View GitHub Profile
@woogist
woogist / gist:5494642
Created May 1, 2013 10:36
Add css to hustle for the social icons in header tutorial
#header .social {
float:right;
margin-top:4.3em;
}
#header .newsletter-form .email {
width: 140px;
}
#header .social a {
@woogist
woogist / gist:5501365
Created May 2, 2013 10:23
SuperStore slider url applied to the slide background image.
if ( $url != '' ) {
echo '<div class="slide-media"> <a href="' . esc_url( $url ) .'">'. $slide_media . '</a>'. '</div><!--/.slide-media-->' . "\n";
}else{
echo '<div class="slide-media">' . $slide_media . '</div><!--/.slide-media-->' . "\n";
}
@woogist
woogist / gist:5509621
Created May 3, 2013 14:57
Replace default wordpress menu
function remove_default_menu_and_load_custom(){
remove_action('woo_header_after','woo_nav');
add_action('woo_header_after','custom_nav',10);
}
add_action('init', 'remove_default_menu',10);
@woogist
woogist / gist:5541418
Created May 8, 2013 15:54
WooCommerce - Change Placeholder Image
/*
* goes in theme functions.php or a custom plugin. Replace the image filename/path with your own :)
*
**/
add_action( 'init', 'custom_fix_thumbnail' );
function custom_fix_thumbnail() {
add_filter('woocommerce_placeholder_img_src', 'custom_woocommerce_placeholder_img_src');
function custom_woocommerce_placeholder_img_src( $src ) {
@woogist
woogist / wc-category-breadcrumb
Created May 8, 2013 20:00
Show product categories in WooFramework breadcrumbs
// Add product categories to the "Product" breadcrumb in WooCommerce.
// Get breadcrumbs on product pages that read: Home > Shop > Product category > Product Name
add_filter( 'woo_breadcrumbs_trail', 'woo_custom_breadcrumbs_trail_add_product_categories', 20 );
function woo_custom_breadcrumbs_trail_add_product_categories ( $trail ) {
if ( ( get_post_type() == 'product' ) && is_singular() ) {
global $post;
$taxonomy = 'product_cat';
@woogist
woogist / gist:5553906
Created May 10, 2013 11:44
Canvas: Search in top navigation
/*-----------------------------------------------------------------------------------*/
/* Optional Top Navigation (WP Menus) */
/*-----------------------------------------------------------------------------------*/
if ( ! function_exists( 'woo_top_navigation' ) ) {
function woo_top_navigation() {
if ( function_exists( 'has_nav_menu' ) && has_nav_menu( 'top-menu' ) ) {
?>
<div id="top">
<div class="col-full">
<?php
@woogist
woogist / remove-product-tabs
Created May 10, 2013 16:37
Remove Product Description and Review tabs in WooCommerce
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
@woogist
woogist / gist:5575203
Created May 14, 2013 11:13
Create a full-width footer in Canvas Example CSS http://support.woothemes.com/entries/22501381
body {padding: 0;}
#footer-container, #footer-widgets-container { background: #EDEDED; }
@woogist
woogist / custom.css
Created May 16, 2013 11:23
Css for inspire theme button
a.btn { background: transparent url(images/btn-slider-a.png) no-repeat scroll top right; color: #444; display: block; float: left; height: 48px; margin-right: 15px;padding-right: 23px; text-decoration: none; font-weight:bold;font-size:14px;text-transform:uppercase; margin-bottom:20px; }
a.btn span { text-shadow:#fff 1px 1px 0; }
a.btn { background: transparent url(images/btn-slider-a.png) no-repeat scroll top right; color: #444; display: block; float: left; height: 48px; margin-right: 15px;padding-right: 23px; text-decoration: none; font-weight:bold;font-size:14px;text-transform:uppercase; margin-bottom:20px; }
a.btn span { background: transparent url(images/btn-slider-span.png) no-repeat;display: block;line-height:14px;padding: 17px 0 17px 23px;}
a.btn:hover { opacity:0.9; color: #222;outline: none;}
a.btn:hover span { padding: 17px 0 17px 23px;}
@woogist
woogist / gist:5656597
Created May 27, 2013 11:32
Add page title to blog page template
add_action ( 'woo_content_before', 'add_blog_title' );
function add_blog_title() {
if ( is_page_template( 'template-blog.php' ) )
echo '<h1 class="page-title">Blog Page Title</h1>';
}