Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Disable Popup Maker on a Product Archive Page
<?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