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
@media only screen and (max-width: 768px) { | |
#main-nav li ul.children li {padding-left:20px;} | |
} |
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_list_pages', 'add_loginout_link', 10, 2 ); | |
function add_loginout_link( $items, $args ) { | |
if (is_user_logged_in() ) { | |
$items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>'; | |
} | |
elseif (!is_user_logged_in()) { | |
$items .= '<li><a href="'. site_url('wp-login.php') .'">Log In</a></li>'; | |
} | |
return $items; | |
} |
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 == 'top-menu') { | |
$items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>'; | |
} | |
elseif (!is_user_logged_in() && $args->theme_location == 'top-menu') { | |
$items .= '<li><a href="'. site_url('wp-login.php') .'">Log In</a></li>'; | |
} | |
return $items; | |
} |
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
<tr class="cart-subtotal"> | |
<th colspan="2"><strong><?php _e('WordPress Theme Product ID', 'woocommerce'); ?></strong></th> | |
<?php | |
foreach ($woocommerce->cart->get_cart() as $item_id => $values) : | |
$_product = $values['data']; | |
?> | |
<td><?php echo $_product->id; ?></td> | |
<?php endforeach; ?> | |
</tr> |
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
// Search filter returning posts only, not pages | |
function sd_limit_search_results_post_type( $query ) { | |
if ( $query->is_search ) { | |
$query->set( 'post_type', 'post' ); | |
} | |
return $query; | |
} | |
add_filter( 'pre_get_posts', 'sd_limit_search_results_post_type' ); |
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
$title_before = '<h1 class="archive_header">'; | |
$title_after = '</h1>'; | |
echo category_description( get_category_by_slug('category-slug')->term_id ); |
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('init', 'wooninja_remove_meta_wc_generator'); | |
function wooninja_remove_meta_wc_generator() { | |
global $woocommerce; | |
remove_action( 'wp_head', array(&$woocommerce, 'generator') ); | |
} |
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
#top {padding:0 !important;margin:0 !important} | |
#footer-container, #footer-widgets-container { background: #EDEDED; } | |
body { margin:0 !important;padding:0 !important} |
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_head','woo_custom_typekit'); | |
function woo_custom_typekit() { ?> | |
<script type="text/javascript" src="http://use.typekit.com/XXXX.js"></script> | |
<script type="text/javascript">try{Typekit.load();}catch(e){}</script> | |
<?php } |
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( 'woo_portfolio_gallery_exclude', 'woo_custom_portfolio_exclude'); | |
function woo_custom_portfolio_exclude( $exclude_str ) { | |
if (is_page('test')) { | |
$exclude_str = 'logos'; | |
} | |
return $exclude_str; | |
} |