Use wp_logout_url()
https://developer.wordpress.org/reference/functions/wp_logout_url/
<a href="<?php echo wp_logout_url(); ?>">Logout</a>
Related Posts:
- Log out without confirmation request (nonce)
- Can I use the same nonce for multiple requests on the same page?
- How to use nonce with front end submission form?
- Do I require the use of nonce?
- WordPress “Link has expired” error on updating posts
- How to log out everywhere else, destroy all sessions “all other devices”?
- Security – Ajax and Nonce use [closed]
- When must I use and verify nonce?
- What SQL / WordPress queries would need a nonce?
- Displaying a button on each post
- Using Multiple Submit buttons to trigger customised php functions
- Insert a button on a page with random number generation
- WP nonce invalid
- Button not refreshing page
- How to make a search button that will search my website?
- How to: PHP Log Out Link?
- Login/logout in header
- Why ajax doesn’t work on certain wordpress hooks and reload the page instead?
- Why ajax doesn’t work on certain wordpress hooks?
- Are nonces in WP REST API optional by default?
- Change “add to cart” button color based on Woocommerce product category [closed]
- Why my image upload button is not working in wordpress widget area?
- Form Security: nonce vs. jQuery
- AJAX button action in foreach
- element not working in Safari [closed]
- WordPress comment submit button substitutes/options
- Function won’t run onclick using Ajax
- Force Users To Relogin
- How to remap one of the TinyMCE Advanced Editor button to open the wordpress media library?
- How to hook a logout funtion for specific usr role in wordpress?
- How to use the wpsnonce clone post link?
- Logout redirects to default page
- Cannot access $wpdb, comes back NULL
- Create special button on WP Tiny MCE Posts Editor for Shortcodes
- Add a product category to a specific product via a button
- Send an e-mail on address with the link with disliked post
- Reliable way to add nonce to HTTP Header in WordPress?
- Check if user had autologin & if so, logout
- How to edit button permalink inside function.php using a child theme?
- Change Login or Logout text based on status
- How do I stop my form from adding code to current page URL instead of re-directing. Been stuck for days
- Nonce fail after second submit attempt
- Functions are causing errors
- Using Nonce for my Form
- Unable to logout correctly after wp-login file was modified
- Data insertion after clicking a button does not work (script, AJAX, PHP)
- ACF block gutenberg aligncenter don’t work
- Nonce code vulnerability
- How can I list only Subcategories in Woocommerce
- PHP Syntax getting PHP terms
- PHP-Code inside Href-Tag
- PHP Call to External Database
- How to post data to a word press site in case of a mobile app
- What languages were used to build WordPress? [closed]
- WordPress plugin/code to to to next/previous post in same category
- how to get category name if my category got custom slug
- Alternative loop syntax error [closed]
- How to strip/remove all blank spaces at the beginning/end of a search string
- why my “recepie” category is not taken into account in my request
- How can I execute $string = if();? [closed]
- Parse error: syntax error, unexpected ‘echo’ (T_ECHO) in C:\xampp\htdocs\AttendanceSystem\resources\php\method.php on line 250 [closed]
- Parse error: syntax error, unexpected ‘}’ in C:\wamp64\www\Proiect\aplicatie\user_check.php on line 18 [closed]
- Adding php within a return statement [closed]
- How to add margin underneath woocommerce total price amount -> productpages
- Pagination in category.php not functioning
- Display post of specific category on page
- HOW TO Insert Existing PHP Code to WOrdPress
- where is the mistake in PHP Warning: Invalid argument supplied for foreach() in line 3
- How to show blog posts changing every time after refreshing the page in non-wordpress website?
- SHARING TO FACEBOOK – FROM DYNAMICALLY GENERATED PAGE
- Echo piece of code from file
- Adding placeholder text field to woocommerce checkout [closed]
- Query posts by custom fields (object post)
- Cannot modify header information – headers already sent
- Adding multiple emails to a
- Query Concatenation
- Send foreach $_post method to contact form 7 [closed]
- WP Debug enabled Undefined index error in a widget
- php 7.0 update to 7.1 and at least 7.2
- Warning: Cannot modify header information
- Can I have a php site on subdirectory of WordPress?
- How would I split the results into two columns [closed]
- ACF Date fileds to Age Convert [closed]
- is there away to hide php code in wordpress not to show in PAGES
- Displaying categories
- Whats wrong with my code? Need To add String to shortcode? [closed]
- Why this Read More Not working in Php?
- How to combine array info [closed]
- How to get the Woocoomerce subtotal value without tax in the hardcode? [closed]
- How do I get Roboto Google Font to display normal font-style? [closed]
- Select area and checkbox data is not saving?
- Save custom field value to variable for conditional – why is this not working? [closed]
- Shortcode always at top of content
- Populate checkboxes from array
- My title is showing after the shortcode
- Display popularpost posts of the last 2 days
- Cookie not created in AJAX request
- Display Sale Price Before Regular Price (WooCommerce)
- on category page get name of category as a string
- How do I reformat this to add php inside php?