Skip to content

Instantly share code, notes, and snippets.

@ericakfranz
Created December 29, 2014 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericakfranz/d50816f6ea862d49c7fe to your computer and use it in GitHub Desktop.
Save ericakfranz/d50816f6ea862d49c7fe to your computer and use it in GitHub Desktop.
Load OptinMonster optin on author archive only
add_filter( 'optin_monster_output', 'ekf_om_modify_output', 10, 2 );
function ekf_om_modify_output( $init, $optin ) {
// Replace 'optin-slug' with your own optin slug which can be found in the OptinMonster Overview list
if ( is_author() ) {
$init['optin-slug'] = Optin_Monster_Output::get_instance()->get_optin_monster( $optin->ID );
}
return $init;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment