Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jonahcoyote/dd6a60a6cfeb99941fa539006cf54d2e to your computer and use it in GitHub Desktop.
Save jonahcoyote/dd6a60a6cfeb99941fa539006cf54d2e to your computer and use it in GitHub Desktop.
Add custom tabs to the MemberPress Account Page
<?php
add_action('mepr_account_nav', 'custom_account_nav', 10, 1);
function custom_account_nav($user) {
$mepr_options = MeprOptions::fetch();
$whaa_url = $mepr_options->account_page_url('action=whaa');
?>
<span class="mepr-nav-item custom-whaa">
<a href="<?php echo $whaa_url; ?>" id="mepr-account-whaa"><?php _e('Whaa', 'memberpress'); ?></a>
</span>
<?php
}
add_action('mepr_account_nav_content', 'custom_account_nav_content', 10, 1);
function custom_account_nav_content( $action ) {
if($action == 'whaa') {
echo "Boo Yah!";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment