Created
January 18, 2017 19:12
-
-
Save isabelc/ecf1a3bed0895bf49c24ddde7fd03b39 to your computer and use it in GitHub Desktop.
Add content to top of the Simple Membership Profile page
This file contains 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
/** | |
* Add custom content at the top of the Simple Membership Profile page | |
*/ | |
function abc_membership_profile_page_top( $default ) { | |
$url = 'http://yoursite.com/chart-page/'; | |
$custom_content = '<p>Create a <a href="' . esc_url( $url ) . '" target="_blank">birth report</a>.</p>'; | |
// Load the default edit profile template | |
if ( class_exists( 'SwpmUtilsTemplate' ) ) { | |
ob_start(); | |
SwpmUtilsTemplate::swpm_load_template('edit.php', false); | |
$custom_content .= ob_get_clean(); | |
} | |
return $custom_content; | |
} | |
add_filter('swpm_profile_form_override', 'abc_membership_profile_page_top'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment