• Resolved saraoucht

    (@saraoucht)


    Hello everyone,

    I am using the User Registration plugin to handle registration of new users and login in a wordpress website. After a user is logged in, a welcome page is loaded providing the user with options to choose from: Dashboard, Profile Details, Change Password, and Logout. In that page, I need to add an extra tab between Change Password and Logout that will load another wordpress page. I tried changing the html just from the wordpress editor of the page, but I could not do that since the page has a shortcode [user_registration_my_account]. Could someone help, please, with the correct steps to do that change and what is the right file to update.

    Thank you

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @saraoucht,

    You can add a new tab. Please refer to this documentation link https://docs.wpeverest.com/docs/user-registration/how-to/how-to-add-additional-tabs-in-my-account/ to add a new tab in the account page.

    If you want to redirect users to another page after login then please refer to this documentation link https://docs.wpeverest.com/docs/user-registration/how-to/how-to-change-redirect-url-after-login/

    I hope it helps.

    Regards.

    Thread Starter saraoucht

    (@saraoucht)

    Hi @sharmadpk03

    Thank you for your reply to my post.
    I followed the guide on the documentation you shared with me, but it does not work for me. When I upload the updated php file, I get the error “Invalid Backend Response. Data is not JSON”.
    The first time, I added the code in the file function.php, but it did not work. So, I tried the second time to add the code in file “functions-ur-page”. I am not sure if I am updating the wrong file. Also, I added the code at the bottom of the file.

    Could you please help?

    Thank you!

    Hi @saraoucht,

    Can you verify if you have added your code in function.php file of the active theme?

    Regards!

    Thread Starter saraoucht

    (@saraoucht)

    Hi @rumesh38

    I get the same error when I add the code lines to the file functions.php in the theme’s folder. Does each part of the code need to go under a specific section of the code?

    Thank you

    Thread Starter saraoucht

    (@saraoucht)

    Hi @rumesh38

    I created a theme child to which I tried adding the new code in the file function.php, but I am getting the same error. I searched on the net and found that I need to disable WP_Debug, so when I tried updating the file wp-config.php by adding the following line of code:

    define( ‘WP_DEBUG’, false );

    I get the same error “Invalid Backend Response Data is not JSON”

    So I am not sure why I keep getting that error.

    Any other suggestions/solutions please?

    • This reply was modified 6 years, 9 months ago by saraoucht.

    Hi @saraoucht,

    You have to add the code in the bottom of function.php file.
    Maybe there is some issue within your code. Can you post the codes you have added here?

    Regards!

    Thread Starter saraoucht

    (@saraoucht)

    Hi @rumesh38

    Sorry for the late reply. Here is the code I add to the functions.php file (I copy it from the documentation available in link
    https://docs.wpeverest.com/docs/user-registration/how-to/how-to-add-additional-tabs-in-my-account/
    ):

    add_filter( ‘user_registration_account_menu_items’, ‘ur_custom_menu_items’, 10, 1 );
    function ur_custom_menu_items( $items ) {
    $items[‘new-item’] = __( ‘New’, ‘user-registration’ );
    return $items;
    }
    add_action( ‘init’, ‘user_registration_add_new_my_account_endpoint’ );
    function user_registration_add_new_my_account_endpoint() {
    add_rewrite_endpoint( ‘new-item’, EP_PAGES );
    }
    function user_registration_new_item_endpoint_content() {
    echo ‘Your new content’;
    }
    add_action( ‘user_registration_account_new-item_endpoint’, ‘user_registration_new_item_endpoint_content’ );

    Regards,

    Hi @saraoucht,

    There is no error on your code. We might need to access your backend. Please contact us through our contact form for the support.
    https://wpeverest.com/contact/

    Regards!

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

The topic ‘My Account Page Customization’ is closed to new replies.