Skip to content

Instantly share code, notes, and snippets.

View woogist's full-sized avatar

WooCommerce.com Documentation woogist

View GitHub Profile
<?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' ) );
wp_register_script( 'prettyPhoto', get_template_directory_uri() . '/includes/js/jquery.prettyPhoto.js', array( 'jquery' ) );
<?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;
<?php
add_filter( 'woo_filter_post_meta', 'woo_custom_filter_post_meta', 20 );
?>
<?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;
<?php
function woo_custom_filter_post_meta ( $content ) {
$content = ' '.do_shortcode( '[twitter_follow username="woothemes"]');
return $content;
} // End woo_custom_filter_post_meta()
?>
<?php
function woo_custom_filter_post_meta ( $content ) {
return $content;
} // End woo_custom_filter_post_meta()
?>
<?php
do_shortcode( '[twitter_follow username="woothemes"]');
?>
<?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()
?>