Skip to content

Instantly share code, notes, and snippets.

@Crocoblock
Created November 19, 2024 14:57
Show Gist options
  • Save Crocoblock/1f1e7538e7538a52447dee869c8ccdf7 to your computer and use it in GitHub Desktop.
Save Crocoblock/1f1e7538e7538a52447dee869c8ccdf7 to your computer and use it in GitHub Desktop.
JetPopup Filter Exclude relation type
<?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 );
@Crocoblock
Copy link
Author

You need to add '--exclude-or' to the title for the popup https://i.imgur.com/OLbTL4o.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment