Adding Tabs to the Account Page

For the code needed to accomplish this custom development, please see this gist in GitHub.

That code can be used as a plugin, or you can cut out the commented items at the top and paste the code somewhere else like a functions.php file or in the  My Custom Functions plugin. Lines 22 and on can be deleted as well if you just want to link to another page.

Adding More than One Tab

You need to edit the following:

<span class="mepr-nav-item prem-support">
  <a href="/account/?action=premium-support">Premium Support</a>
</span>

To something like:

<span class="mepr-nav-item prem-support">
  <a href="/account/?action=premium-support">Premium Support</a>
</span>

<span>
  <a href="http://site.com/feedback/">Provide Feedback</a>
</span>

Here is a finished example with two new tabs. Tab 1 (Premium Support) keeps the user on the account page and shows them a Contact Form 7 form. Tab 2 (Provide Feedback) redirects the user to a separate page on your site where they can provide feedback.

<?php
function mepr_add_some_tabs($user) {
  ?>
    <span class="mepr-nav-item prem-support">
      <!-- KEEPS THE USER ON THE ACCOUNT PAGE -->
      <a href="/account/?action=premium-support">Premium Support</a>
    </span>

    <span>
      <!-- REDIRECTS THE USER TO A DIFFERENT PAGE ON THE SITE -->
      <a href="http://site.com/feedback/">Provide Feedback</a>
    </span>
  <?php
}
add_action('mepr_account_nav', 'mepr_add_some_tabs');

function mepr_add_tabs_content($action) {
  //Listens for the "premium-support" action on the account page, before rendering the contact form shortcode.
  if($action == 'premium-support') {
    <?php echo do_shortcode('[contact-form-7 id="49034" title="Premium Support Form"]'); ?>
  }
}
add_action('mepr_account_nav_content', 'mepr_add_tabs_content');