Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Filter Wordpress popup content
<?php
/**
* IF you want to filter popups content to add custom content
* http://wordpress.org/plugins/popups/
**/
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
You can’t perform that action at this time.