Skip Navigation

[Résolu] Placeholder for site url

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
How to send Site url, name, and login_page url in email notification using CRED form?

Solution:
1. For site name you can use builtin shortcode of Views [wpv-bloginfo] and for Site url you can use a custom shortcode [bloginfo_siteurl]

Please add this code in your theme’s or child theme’s functions.php file:

function bloginfo_siteurl_func( ) {
    return get_site_url();
}
add_shortcode( 'bloginfo_siteurl', 'bloginfo_siteurl_func' );

For frontend login page, please add this code in your theme’s or child theme’s functions.php file:

function ls_login_url_func( ) {
    return wp_login_url();
}
add_shortcode( 'ls_login_url', 'ls_login_url_func' );

2. Then use shortcodes in the CRED notification body like this:

Site name: [wpv-bloginfo]
Site url: [bloginfo_siteurl]
Login page url: [ls_login_url]
This support ticket is created Il y a 6 années et 6 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 réponses, has 2 voix.

Last updated by spiridonR Il y a 6 années et 6 mois.

Assisted by: Noman.

Auteur
Publications
#567125

Hi. I need in the mail notification send when a new user is registered to add the following:
- site url
- site name
- the login_page url.

I don't want to put them hardcoded.

Is there a placeholder similar to %%RESET_PASSWORD_LINK%% or should I create custom of each one of them?

Thanks in advance

#567166

Noman
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for getting in touch with us. For site name you can use builtin shortcode of Views [wpv-bloginfo] and for Site url you can use a custom shortcode [bloginfo_siteurl]

Please add this code in your theme’s or child theme’s functions.php file:

function bloginfo_siteurl_func( ) {
	return get_site_url();
}
add_shortcode( 'bloginfo_siteurl', 'bloginfo_siteurl_func' );

Then use shortcodes in the CRED notification body like this:

Site name: [wpv-bloginfo]
Site url: [bloginfo_siteurl]
Login page url: [bloginfo_siteurl]/mylogin

For frontend login page, we can’t detect it directly that were the login form actually exists, you can add the page slug of the login page in front of shortcode like above.

I hope it helps, Thank you

#567179

Hi, thanks for the prompt answer.

I managed also to get the login url via shortcode using the following in my functions.php file:

function ls_login_url_func( ) {
    return wp_login_url();
}
add_shortcode( 'ls_login_url', 'ls_login_url_func' );

and then

Login page url: [ls_login_url]
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.