Created
November 19, 2024 14:57
-
-
Save Crocoblock/1f1e7538e7538a52447dee869c8ccdf7 to your computer and use it in GitHub Desktop.
JetPopup Filter Exclude relation type
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 | |
add_filter( 'jet-popup/popup-condition/is_excluded/and', function( $is_excluded, $excludes_matchs, $popup_id ) { | |
if ( ! get_post( $popup_id ) || false === strpos( get_post( $popup_id )->post_title, '--exclude-or' ) ) { | |
return $is_excluded; | |
} | |
return in_array( true, $excludes_matchs ); | |
}, 0, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to add '--exclude-or' to the title for the popup https://i.imgur.com/OLbTL4o.png