• Resolved Ahir Hemant

    (@hemant-ahir)


    Hi

    having issues in slug. for example

    function ur_custom_menu_items( $items ) {
        $items['new-item'] = __( 'New', 'user-registration' );
        return $items;
    }

    I need to change $items[‘new-item’] to $items[‘items’]

    Also changed:

    function user_registration_add_new_my_account_endpoint() {
        add_rewrite_endpoint( 'items', EP_PAGES );
    }

    Permalink reset so page is showing but the showing default messge instead of mine custom content.

    From your account dashboard you can edit your profile details and edit your password.

    Not xyz? Sign out.

    Please advice.

    Thanks

Viewing 1 replies (of 1 total)
  • Hi @hemant-ahir,

    Did you add your custom content as suggested in the documentation?
    Like:

    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' );

    For your purpose please change it to the following:

    function user_registration_items_endpoint_content() {
        echo 'Your new content';
    }
    add_action( 'user_registration_account_items_endpoint', 'user_registration_items_endpoint_content' );

    As you have noticed items is your new endpoint in action hook.
    Hope this helps!

    Regards!

    • This reply was modified 5 years, 7 months ago by Rumesh Udash.
Viewing 1 replies (of 1 total)
  • The topic ‘Profile page slug issues’ is closed to new replies.