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_blog_template_query_args', 'blog_exclude_posts' ); | |
function blog_exclude_posts( $args ) { | |
$args['post_type'] = 'post'; | |
$args['paged'] = $paged; | |
$args['category_name'] = 'news'; | |
return $args; |
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
remove_action ('woocommerce_single_product_summary', 'woocommerce_output_product_data_tabs', 34 ); | |
add_action('woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 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
@media only screen and (min-width: 768px) { | |
ul.products li.product { | |
float: left; | |
padding: 0; | |
margin-right: 0; | |
margin-bottom: 0; | |
clear: none; | |
width: 33.33%; | |
padding-top: 33.33%; |
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
input.qty { | |
-moz-appearance: textfield; /* Hide buttons for Firefox 29 and later */ | |
} |
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 custom_projects_posts_per_page( $query ) { | |
if ( is_admin() || ! $query->is_main_query() ) | |
return; | |
if ( is_post_type_archive( 'project' ) || is_tax( 'project-category' ) ) { | |
// Display all posts for a custom post type called 'project' | |
$query->set( 'posts_per_page', -1 ); | |
return; | |
} | |
} | |
add_action( 'pre_get_posts', 'custom_projects_posts_per_page', 1 ); |
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 custom_projects_randomise_project_output( $query ) { | |
if ( is_admin() || ! $query->is_main_query() ) | |
return; | |
if ( is_post_type_archive( 'project' ) || is_tax( 'project-category' ) ) { | |
$query->set( 'order', 'ASC' ); | |
$query->set( 'orderby', 'rand' ); | |
return; | |
} |
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', 'init_sensei_hooks' ); | |
function init_sensei_hooks() { | |
global $woothemes_sensei; | |
remove_action( 'sensei_before_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper' ), 10 ); | |
remove_action( 'sensei_after_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper_end' ), 10 ); | |
add_action('sensei_before_main_content', 'my_theme_wrapper_start', 10); | |
add_action('sensei_after_main_content', 'my_theme_wrapper_end', 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
if ( ( isset( $_GET['action'] ) && $_GET['action'] != 'logout' ) || ( isset( $_POST['login_location'] ) && ! empty( $_POST['login_location'] ) ) ) { | |
add_filter('login_redirect', 'my_login_redirect', 10, 3); | |
function my_login_redirect() { | |
$location = $_SERVER['HTTP_REFERER']; | |
wp_safe_redirect( $location ); | |
exit(); | |
} | |
} |
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 custom_exclude_on_sale_products_from_query( $q ){ | |
if ( $q->is_search() ) return; | |
if ( ! $q->is_main_query() ) return; | |
if ( ! $q->is_post_type_archive() ) return; | |
if ( ! is_admin() ) { | |
$product_ids_on_sale = wc_get_product_ids_on_sale(); | |
$q->set( 'post__not_in', (array) $product_ids_on_sale ); |
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 storefront_post_meta() { | |
?> | |
<aside class="entry-meta"> | |
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?> | |
<?php | |
/* translators: used between list items, there is a space after the comma */ | |
$categories_list = get_the_category_list( __( ', ', 'storefront' ) ); | |
if ( $categories_list && storefront_categorized_blog() ) : ?> |
OlderNewer