diff --git a/CHANGES.md b/CHANGES.md index 65d7cfb..f64fd2e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,8 @@ # Changelog +## 1.9.4 (11/29/23) +* Fixed: CCA's showing up on different archives than set in location settings. + ## 1.9.3 (11/27/23) * Fixed: CCA's showing up on different post types than set in location settings. diff --git a/includes/functions.php b/includes/functions.php index fd50bcf..2f7e3da 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -263,7 +263,7 @@ function maicca_do_archive_cca( $args ) { if ( is_home() ) { // Bail if not showing on post archive. // Using '*' is not currently an option. This is here for future use. - if ( ! $args['types'] && ( ! in_array( '*', $args['types'] ) || ! in_array( 'post', $args['types'] ) ) ) { + if ( ! $args['types'] && ! ( in_array( '*', $args['types'] ) || in_array( 'post', $args['types'] ) ) ) { return; } } @@ -272,7 +272,7 @@ function maicca_do_archive_cca( $args ) { // Bail if shop page and not showing here. // Using '*' is not currently an option. This is here for future use. if ( maicca_is_shop_archive() ) { - if ( ! $args['types'] && ! ( in_array( '*', $args['types'] ) || in_array( 'product', $args['types'] ) ) ) { + if ( ! $args['types'] || ! ( in_array( '*', $args['types'] ) || in_array( 'product', $args['types'] ) ) ) { return; } } @@ -282,7 +282,7 @@ function maicca_do_archive_cca( $args ) { $post_type = isset( $wp_query->query['post_type'] ) ? $wp_query->query['post_type'] : ''; - if ( ! $args['types'] && ! ( in_array( '*', $args['types'] ) || is_post_type_archive( $post_type ) ) ) { + if ( ! $args['types'] || ! ( in_array( '*', $args['types'] ) || is_post_type_archive( $post_type ) ) ) { return; } } diff --git a/mai-custom-content-areas.php b/mai-custom-content-areas.php index 94e9742..eb0d3da 100644 --- a/mai-custom-content-areas.php +++ b/mai-custom-content-areas.php @@ -4,7 +4,7 @@ * Plugin Name: Mai Custom Content Areas * Plugin URI: https://bizbudding.com/mai-theme/plugins/mai-custom-content-areas/ * Description: Display content, calls to action, ads, etc. on posts, pages, and custom post types conditionally by category, tag, taxonomy, entry title, and more. - * Version: 1.9.3 + * Version: 1.9.4 * * Author: BizBudding * Author URI: https://bizbudding.com @@ -92,7 +92,7 @@ public function __wakeup() { private function setup_constants() { // Plugin version. if ( ! defined( 'MAI_CCA_VERSION' ) ) { - define( 'MAI_CCA_VERSION', '1.9.3' ); + define( 'MAI_CCA_VERSION', '1.9.4' ); } // Plugin Folder Path.