Customizing the restricted content login

Hi Support,

I am using X to restrict content for users who are not logged in.
I used the shortcode [protect] [/protect] for this functionality.

My question is: How do I customize the form?
I want to customize the text and also add an option for users to register.

Site: https://heavykiwi.com/ask
Any help will be appreciated, thanks!

Hi there,

Please install a Child Theme and add the code below to the functions.php file of your child theme:

function custom_text_translate($translated) { 
	
	$translated = str_ireplace('Restricted Content Login', 'ADD YOUR TEXT HERE', $translated);

	return $translated; 
}

add_filter('gettext', 'custom_text_translate' );

Change ADD YOUR TEXT HERE with the text you want to show in the title section of the form.

For the second part of the question, you need to first go to Settings > General and make sure that the Registration is allowed on your website:

After that, you will need to go to X > Theme Options > JS and add the Javascript code below:

jQuery('.x-protect form').append('<div style="margin-top: 15px;"><a href="https://heavykiwi.com/wp-login.php?action=register">Register</a></div>');

You can change Register with whatever text you want to add for the registration link.

Please consider that the second part of the question is not a feature that is available out of the box and considered a customization which is outside of our support scope and we did try to be extra helpful to suggest that proper code. We will not be able to give support further on this matter.

Kindly open up new threads for additional questions as it will help us to focus on each issue and give you a better support which you deserve. Having a long threads makes the maintaining job harder and also it will be harder for the other customers to find the correct information if they have similar issues. You are always welcomed to reply to this thread to follow up the same question.

Thank you.

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