This file contains 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
.magazine #loopedSlider li.slide img { height: 300px !important; } | |
#loopedSlider .slides { top:0; left:0; overflow: hidden; position:relative; } |
This file contains 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
// Display the "Business" slider above the default WordPress homepage. | |
add_action( 'get_header', 'woo_custom_load_biz_slider', 10 ); | |
function woo_custom_load_biz_slider () { | |
if ( is_page('portfolio') ) { | |
add_action( 'woo_content_before', 'woo_slider_biz', 10 ); | |
add_action( 'woo_content_before', 'woo_custom_reset_biz_query', 11 ); | |
add_action( 'woo_load_slider_js', '__return_true', 10 ); | |
add_filter( 'body_class', 'woo_custom_add_business_bodyclass', 10 ); | |
} |
This file contains 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_content_before', 'categories_grid', 10 ); | |
function categories_grid() { | |
if ( is_singular('post') ) { | |
echo '<section id="main" class="fullwidth">'; | |
get_template_part( 'includes/categories-grid' ); | |
echo '</section>'; | |
} |
This file contains 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 | |
if ( $settings['enable_slides'] == 'true' ) { | |
// Load the slider background images. | |
get_template_part( 'includes/slider', 'background' ); | |
} | |
?> |
This file contains 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 | |
$child_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE $wpdb->posts.post_parent = 134 AND $wpdb->posts.post_type = 'page' AND $wpdb->posts.post_status = 'publish' ORDER BY $wpdb->posts.ID ASC"); | |
$exclude = implode($child_ids,', '); | |
wp_list_pages('exclude=' . $exclude . '&title_li='); | |
?> |
This file contains 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
body.single-product #sidebar {display:none;} | |
body.single-product #main.col-left {width:100%} |
This file contains 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
if ( !function_exists('custom_gravatars') ) { | |
function custom_gravatars( $avatar_defaults ) { | |
$myavatar = get_template_directory_uri() . '/images/custom-avatar.png'; | |
$avatar_defaults[$myavatar] = 'people'; | |
return $avatar_defaults; | |
} | |
add_filter( 'avatar_defaults', 'custom_gravatars' ); | |
} |
This file contains 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
function loggedin_user_archive() { | |
global $current_user; | |
get_currentuserinfo(); | |
if ( is_user_logged_in() ) { | |
echo '<a href="' . site_url() . '/author/' . $current_user->display_name . '/">'. $current_user->display_name .' Archives</a>'; | |
} | |
} |
This file contains 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
** | |
* Usage: | |
* Paste a gist link into a blog post or page and it will be embedded eg: | |
* https://gist.github.com/2926827 | |
* | |
* If a gist has multiple files you can select one using a url in the following format: | |
* https://gist.github.com/2926827?file=embed-gist.php | |
*/ | |
wp_embed_register_handler( 'gist', '/https:\/\/gist\.github\.com\/(\d+)(\?file=.*)?/i', 'wp_embed_handler_gist' ); |
This file contains 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( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 ); | |
function add_loginout_link( $items, $args ) { | |
if (is_user_logged_in() && $args->theme_location == 'primary-menu') { | |
$items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>'; | |
} | |
elseif (!is_user_logged_in() && $args->theme_location == 'primary-menu') { | |
$items .= '<li><a href="'. site_url('wp-login.php') .'">Log In</a></li>'; | |
} | |
return $items; | |
} |