From: Laury GvR Date: Fri, 2 Feb 2018 16:34:17 +0000 (-0500) Subject: Only show 'popular tags' sidebar section on blog pages X-Git-Tag: v1.0.0^2~36 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=9d61ebc7819454c12060c4afe4b35e32589e8a61;p=WP-Themes%2Fwmta.git Only show 'popular tags' sidebar section on blog pages --- diff --git a/functions.php b/functions.php index fa6ede3..a82d0f2 100644 --- a/functions.php +++ b/functions.php @@ -335,4 +335,11 @@ function restore_slider_behavior( $settings ) { $settings['infinite'] = 'true'; return $settings; } -add_filter( 'advanced-ads-slider-settings', 'restore_slider_behavior' ); \ No newline at end of file +add_filter( 'advanced-ads-slider-settings', 'restore_slider_behavior' ); + +// More concise way to check for blog-related pages +function is_blog () { + global $post; + $posttype = get_post_type($post ); + return ( ((is_archive()) || (is_author()) || (is_category()) || (is_home()) || (is_single()) || (is_tag())) && ( $posttype == 'post') ) ? true : false ; + } \ No newline at end of file diff --git a/sidebar.php b/sidebar.php index 5c4c214..8b3566b 100644 --- a/sidebar.php +++ b/sidebar.php @@ -48,41 +48,42 @@ if ( ! is_active_sidebar( 'sidebar-1' ) ) { + + +