I am not sure if it’s doable in the front end but I am trying to add this to a page I created:
<a href="<?php echo wp_logout_url( home_url() ); ?>" title="Logout">Logout</a>
This string can be used to logout of WordPress and you immediately get forwarded to the homepage. I tried using the “Code Block” but that didn’t function because I get forwarded to a not found page.
I also tried to add it to a new page in my childtheme by copying the page.php page and inserting at the top:
<?php
/*
Template Name: logoutpage
*/
?>
so I can choose that template for the logout page but that kills the full width of the page.
Hi Martin!
Your trying to add it inside the page content? You could try using a plugin which executes PHP in the content, https://wordpress.org/plugins/exec-php/.
If that’s not working then we can try using a filter to add it somewhere. Take a screenshot and highlight the exact area your wanting to display it.
Best regards,
Elliott
Hi Elliott,
Wow that’s an old plugin. Are you sure it still works with WP 4.+ and/or Enfold?
Martin
Hi!
Only one way to find out :)
If it doesn’t work, there’s likely others which does the same thing, try a search here: https://wordpress.org/plugins/
Best regards,
Rikard