• Resolved fraxinusstudio

    (@fraxinusstudio)


    Following the info on this page: https://docs.wpeverest.com/user-registration/docs/how-to-add-additional-tabs-in-my-account/

    I was able to add the “New” endpoint using the code provided there but if I try to alter it for what I need then I get a 404. This is my code:

    add_filter( 'user_registration_account_menu_items', 'test_custom_menu_items', 10, 1 );
    
    function test_custom_menu_items( $items ) {
    
    $items['test'] = __( 'Test', 'user-registration' );
    
    return $items;
    
    }
    
    add_action( 'init', 'user_registration_add_test_endpoint' );
    
    function user_registration_add_test_endpoint() {
    
    add_rewrite_endpoint( 'test', EP_PAGES );
    
    }
    
    function test_tab_content() {
    
    echo 'Test content';
    
    }
    
    add_action( 'user_registration_account_test_endpoint', 'test_tab_content' );

    Any ideas?

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Amrit Kumar Shrestha

    (@shresthauzwal)

    Hi @fraxinusstudio,

    We have provided complete guidance on our documentation https://docs.wpeverest.com/user-registration/docs/how-to-add-additional-tabs-in-my-account. Please follow the instructions and add the same code to your theme template. The new endpoint will be added to your site. For other modifications of endpoints, it depends on your programming skills.

    If you are not programming-friendly, we have a premium addon called customize my account. You can easily add new endpoints or customize the existing tabs without any single programming code. For more details, please check this link https://wpeverest.com/wordpress-plugins/user-registration/customize-my-account.

    According to the WordPress Support community guidelines, we can not discuss the premium features here because this support forum is for free plugin users.
    If you are interested in premium features, please go through this link https://wpeverest.com. You will find the live chat option to contact our support representative.

    Regards!

    Thread Starter fraxinusstudio

    (@fraxinusstudio)

    Hi Amrit,

    I’m able to add a custom tab using the exact code from the documentation, but as soon as I try to change the tab content, for example, the tab goes to a 404 page.

    As an example, the code in my original message does not work. The “test” tab is shown, but clicking it goes to a 404. According to your documentation though, it looks like this code should work. Are you able to look at the code and see if anything is wrong there, please?

    Many thanks,

    Ash

    Plugin Support Amrit Kumar Shrestha

    (@shresthauzwal)

    Hi @fraxinusstudio,

    The provided code snippets are working fine. Maybe you have missed instructions or added code incorrectly. For your confirmation, please check the following screenshots.

    Code added on functions.php: https://i.imgur.com/Nbr89nD.png
    Template Created under theme folder: https://i.imgur.com/k0WXeBo.png
    Result: https://i.imgur.com/GtR38MH.png

    We suggest you follow the instruction kindly to add a new endpoint on your account page. After adding the mentioned codes, go to WordPress Settings>Permalinks and save the permalink settings.

    Regards!

    Thread Starter fraxinusstudio

    (@fraxinusstudio)

    Flushing the permalinks fixed the issue, thank you!

    Plugin Support Amrit Kumar Shrestha

    (@shresthauzwal)

    Hi @fraxinusstudio ,

    Glad to know that the solution works. ​If you have a moment to spare, then we would really appreciate your review of our plugin. Please click this link: https://wordpress.org/support/plugin/user-registration/reviews/#new-post, and share your thoughts about our team and plugin. We would love to hear from you.

    Thanks in advance 🙂

    Regards!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Can’t create custom account tab’ is closed to new replies.