Skip to content

Commit

Permalink
[ bug fix ] php notice
Browse files Browse the repository at this point in the history
  • Loading branch information
kurudrive committed Nov 11, 2016
1 parent 9616dd9 commit 89b3e77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions_helpers.php
Expand Up @@ -50,7 +50,7 @@ function lightning_get_post_type(){
$postType['slug'] = get_post_type();
if ( !$postType['slug'] ) {
global $wp_query;
if ( $wp_query->query_vars['post_type'] ) {
if ( isset( $wp_query->query_vars['post_type'] ) && $wp_query->query_vars['post_type'] ) {
$postType['slug'] = $wp_query->query_vars['post_type'];
} elseif ( is_tax() ) {
// Case of tax archive and no posts
Expand Down

0 comments on commit 89b3e77

Please sign in to comment.