How to create a logout button?

Hi all,

I am in the process of building my first Bricks website, so far really enjoying the change from other builder providers.

I have managed to display ‘Login/Register’ on the condition that the user is neither logged in or registered, and I have the logic to display the ‘Logout’ button setup correctly, however I cannot manage to achieve my desired result which is to log the user out and return them to the home page of the website?

I have seen another article or two on here but had have no luck implementing any suggestions such as [quote=“clickfusion63, post:2, topic:18666, full:true”]
use for link

{echo:wp_logout_url}

[/quote]

TIA

Welcome. Perhaps you haven’t added the function to the white list.

see Filter: bricks/code/echo_function_names – Bricks Academy

Hi mate :slightly_smiling_face:

Bit of a noob so I apologise in advance.

I put the link on dynamic data and added ‘{echo:wp_logout_url}’ as the entry, I had a look at the linked page you suggested, I ran the code review, but it says ‘No elements found for the selected filter.’.

I would assume I have got this wrong adding the echo as a dynamic tag?

Could you kindly advise me with this :slight_smile:

Thank you

my test

did you make it work ? Im haviong the same issue and it makes me mad why cant they just put an action to bricks for the logout ? It s afucking basic feature of all website where you can login. :confused: