Skip Navigation

[Resolved] Customise wpv-logout-link shortcode??

This thread is resolved. Here is a description of the problem and solution.

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 5 years, 9 months ago. 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.

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)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by julieP 5 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#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