Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Filter Wordpress popup content
* IF you want to filter popups content to add custom content
add_filter('spu/popup/content', 'add_gf_to_spu', 10, 2);
function add_gf_to_spu( $content, $popup){
// Check if the popup is the correct one
if( $popup->ID == ID_NUMBER_HERE ){
if ( is_page(THE_PAGE_YOU_WANT) ) {
$content .= '[my-shortcode-here]';
return $content;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment