diff --git a/author.php b/author.php index a30460a5..042ff3ad 100644 --- a/author.php +++ b/author.php @@ -103,7 +103,9 @@ $tabs['recommendations'] = array( ); // Use first tab if queried tab is not available -if ( ! array_key_exists( $current_tab, $tabs ) ) $current_tab = array_key_first( $tabs ); +if ( ! array_key_exists( $current_tab, $tabs ) ) { + $current_tab = array_key_first( $tabs ); +} // Select tab $tabs[ $current_tab ]['classes'][] = '_current'; diff --git a/includes/functions/_utility.php b/includes/functions/_utility.php index f6f88a28..9c13b001 100644 --- a/includes/functions/_utility.php +++ b/includes/functions/_utility.php @@ -333,6 +333,17 @@ if ( ! function_exists( 'fictioneer_get_author_statistics' ) ) { 'numberposts' => -1, 'orderby' => 'modified', 'order' => 'DESC', + 'meta_query' => array( + 'relation' => 'OR', + array( + 'key' => 'fictioneer_story_hidden', + 'value' => '0' + ), + array( + 'key' => 'fictioneer_story_hidden', + 'compare' => 'NOT EXISTS' + ), + ), 'update_post_term_cache' => false ) );