Skip Navigation

[Résolu] Customise wpv-logout-link shortcode??

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

Problem:

Customize the wpv logout link to use my new filename instead of wp-login.php.

Solution:

There isn't such a built-in option to "Customize the wpv logout link to use my new filename instead of wp-login.php".

You need to consider custom codes, for example, you can use WordPress built-in filter hook "logout_url" to trigger a PHP function, in this function, change the URL to what you want, see WordPress document:

Relevant Documentation:

https://developer.wordpress.org/reference/hooks/logout_url/

This support ticket is created Il y a 5 années et 9 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Marqué : 

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par julieP Il y a 5 années et 9 mois.

Assisté par: Luo Yang.

Auteur
Publications
#1205142

For security reasons I've been looking into ways of hiding/moving/renaming the default wordpress login page. My preferred method is to rename wp-login.php (and change all instances of wp-login in that file to the new name).

Logging in via the frontend login form works because I had already created my own shortcode for this (so I could have custom labels) and I've simply changed wp-login.php in that code to my new filename.

I'm not sure how to customise the wpv logout link to use my new filename instead of wp-login.php though because there are nonces involved. Can you help please?

Thanks

#1205329

Hello,

I assume we are talking about the shortcode [wpv-logout-link], see our document:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-logout-link

There isn't such a built-in option to "customise the wpv logout link to use my new filename instead of wp-login.php".

So in your case, you need to consider custom codes, for example, you can use WordPress built-in filter hook "logout_url" to trigger a PHP function, in this function, change the URL to what you want, see WordPress document:
https://developer.wordpress.org/reference/hooks/logout_url/
And some related example codes:
https://wordpress.stackexchange.com/questions/58453/how-to-change-the-default-logout-link-on-wordpress-admin

For your reference.

#1206348

I managed to sort it myself - thanks