Skip to content

Instantly share code, notes, and snippets.

WooCommerce.com Documentation woogist

Block or report user

Report or block woogist

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View theme-js.php
<?php
/*-----------------------------------------------------------------------------------*/
/* Theme Frontend JavaScript */
/*-----------------------------------------------------------------------------------*/
if ( ! is_admin() ) { add_action( 'wp_print_scripts', 'woothemes_add_javascript' ); }
if ( ! function_exists( 'woothemes_add_javascript' ) ) {
function woothemes_add_javascript() {
wp_enqueue_script( 'third-party', get_template_directory_uri() . '/includes/js/third-party.js', array( 'jquery' ) );
View theme-js.php
wp_register_script( 'prettyPhoto', get_template_directory_uri() . '/includes/js/jquery.prettyPhoto.js', array( 'jquery' ) );
View gist:5436089
<?php
add_filter( 'woo_filter_post_meta', 'woo_custom_filter_post_meta', 20 );
function woo_custom_filter_post_meta ( $content ) {
global $wp_query;
$current_count = $wp_query->current_post + 1;
if ( $current_count == 1 ) {
$content .= ' '.do_shortcode( '[twitter_follow username="woothemes"]');
}
return $content;
View gist:5438356
<?php
function woo_custom_filter_post_meta ( $content ) {
global $wp_query;
$current_count = $wp_query->current_post + 1;
if ( $current_count == 1 ) {
$content .=' '.do_shortcode( '[twitter_follow username="woothemes"]');
}
return $content;
View gist:5438368
<?php
function woo_custom_filter_post_meta ( $content ) {
$content = ' '.do_shortcode( '[twitter_follow username="woothemes"]');
return $content;
} // End woo_custom_filter_post_meta()
?>
View gist:5438379
<?php
function woo_custom_filter_post_meta ( $content ) {
return $content;
} // End woo_custom_filter_post_meta()
?>
View gist:5438387
<?php
do_shortcode( '[twitter_follow username="woothemes"]');
?>
View gist:5438417
<?php
function woo_custom_filter_post_meta ( $content ) {
$content = '<span class="small">By</span> [post_author_posts_link] <span class="small">on</span> [post_date]';
return $content;
} // End woo_custom_filter_post_meta()
?>
You can’t perform that action at this time.