Created
July 22, 2022 00:04
-
-
Save marklchaves/a8f3679ad1bddad8ffc354d1c13c25d2 to your computer and use it in GitHub Desktop.
Disable Popup Maker on a Product Archive Page
This file contains hidden or 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
<?php // Ignore this first line when copying to your child theme's functions.php file. | |
add_action( 'wp', function() { | |
if ( is_product_category() ) { // echo '<h4>This is an archive page.</h4>'; | |
add_filter ( 'pum_popup_is_loadable', function( $is_loadable ) { | |
$is_loadable = false; | |
return $is_loadable; | |
} ); | |
} | |
}, 9 ); | |
/** | |
* You can add the PHP code snippet to your child theme's functions.php file | |
* or with third-party plugins such as My Custom Functions and Code Snippets. | |
* | |
* Learn more: | |
* - https://docs.wppopupmaker.com/article/84-getting-started-with-custom-js | |
* - https://docs.wppopupmaker.com/article/552-getting-started-with-custom-php | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment