saraoucht
Forum Replies Created
-
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 @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 @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
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!
Forum: Fixing WordPress
In reply to: User Registration Plugin CustomizationThank you for your reply! I will post my question on the link you shared with me.