Add Full name in the register

I’m fairly new to this. How do I add a full name in the registration form?

I always see that you have to add the snippets. Where do I add them?
I also want to add a registration page but every time I add the registration block and publish the page it does not show anything. Here is the edit page in WP


And here is the published page link: Register – Arab Chicago Business

  1. Yes, if some functionality is not available yet but possible with a simple code snippet then we add it to the code snippet collection Search · user:hivepress · GitHub Please try following these instructions How to add custom code snippets - HivePress Help Center
  2. Please make sure that you check this page as a non-registered user (e.g. via the browser Incognito window) since the registration form is not available for registered ones.

Is there a way for the “register” in the header to only show up if they are signed out?

If you use the built-in Sign In link without customizations, it should change to the user’s name once the user is logged in. If you added the registration link as a custom menu item in Appearance/Menus, then some third-party solution is required for hiring it Nav Menu Roles – WordPress plugin | WordPress.org

Thank you. How about this. Is it possible to redirect them to home after registering in the register page? I tried registering and after verification, I refreshed the register page then it’s all gone. Is it possible for the logged in users to not access the register page?

You can try this code snippet, replace 123 with the page ID or slug:

add_action(
	'template_redirect',
	function() {
		if ( is_user_logged_in() && is_page( 123 ) ) {
			wp_safe_redirect( home_url() );

			exit;
		}
	}
);

Sorry for the late reply. I tried adding this php snippet and it crashed the website.

The “123” is supposed to be the slug to the register page right? The code I added was

<?php
add_action(
	'template_redirect',
	function() {
		if ( is_user_logged_in() && is_page( register ) ) {
			wp_safe_redirect( home_url() );

			exit;
		}
	}
);

Please try wrapping the register slug with quotes:

add_action(
	'template_redirect',
	function() {
		if ( is_user_logged_in() && is_page( 'register' ) ) {
			wp_safe_redirect( home_url() );

			exit;
		}
	}
);

Thank you!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.