This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Image Crop Alignment to Custom Field | |
function woo_metaboxes_add($woo_metaboxes) { | |
if ( ( get_post_type() == 'portfolio') || ( !get_post_type() ) ) { | |
$woo_metaboxes[] = array ( "name" => "_image_alignment", | |
"std" => "Center", | |
"label" => "Image Crop Alignment", | |
"type" => "select2", | |
"desc" => "Select crop alignment for resized image", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Custom Query Filter to remove video tag posts from blog | |
add_action('pre_get_posts', 'woo_custom_query_filter' ); | |
function woo_custom_query_filter( $query ) { | |
if ($query->is_page_template('template-blog.php') && $query->is_main_query() ) { | |
$query->set('tag__not_in','4'); | |
$query->parse_query(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woo_loop_before', 'wooninja_custom_home_wooslider'); | |
function wooninja_custom_home_wooslider () { | |
if ( is_front_page() && !is_paged() ) { | |
echo do_shortcode('[wooslider slider_type="slides"]'); | |
} // END IF | |
} // End woo_custom_display_page_content() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*-----------------------------------------------------------------------------------*/ | |
/* Add Featured Slider to static Front Page */ | |
/*-----------------------------------------------------------------------------------*/ | |
remove_action( 'woo_main_before', 'woo_featured_slider_loader' ); | |
add_action( 'woo_main_before', 'woo_custom_featured_slider_loader' ); | |
function woo_custom_featured_slider_loader () { | |
21if ( is_front_page()) { | |
get_template_part( 'includes/featured', 'slider' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*-----------------------------------------------------------------------------------*/ | |
/* Add the full portfolio gallery hierarchy to the breadcrumb trail */ | |
/*-----------------------------------------------------------------------------------*/ | |
add_filter( 'woo_breadcrumbs_trail', 'woo_custom_breadcrumbs_trail_add_portfolio_galleries', 10 ); | |
function woo_custom_breadcrumbs_trail_add_portfolio_galleries ( $trail ) { | |
if ( ( get_post_type() == 'portfolio' ) && is_singular() ) { | |
global $post; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $permalink = get_permalink( $post->ID ); echo do_shortcode('[fblike style="button_count" url="' . $permalink . '" float="left"]'); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('woo_main_before', 'wooninja_add_homepage_welcome'); | |
function wooninja_add_homepage_welcome() { | |
if (is_front_page()) { ?> | |
<h3>Welcome to My Site</h3> | |
<?php | |
} // END IF | |
} // END wooninja_add_homepage_welcome() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Custom Query Filter | |
add_action('pre_get_posts', 'woo_custom_query_filter' ); | |
function woo_custom_query_filter( $query ) { | |
if ($query->is_front_page() && $query->is_main_query() ) { | |
$query->set('category__in','25'); | |
$query->parse_query(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Custom Query Filter | |
add_action('pre_get_posts', 'woo_custom_query_filter' ); | |
function woo_custom_query_filter( $query ) { | |
if ($query->is_front_page() && $query->is_main_query() ) { | |
$query->set('posts_per_page','4'); | |
$query->parse_query(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woo_archive_title', 'custom_archive_title', 2 ); | |
function custom_archive_title( $title) { | |
if ( is_tag() ) { | |
$title = '<span class="fl cat">' . __( 'Custom', 'woothemes' ) . ' | ' . single_cat_title( '', false ) . '</span> <span class="fr catrss">'; | |
} | |
return $title; | |
} |
NewerOlder