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
- How to use wp_insert_user on WordPress Multisite?
- How do I add a php statement to a jQuery string
- Upload images and attachments from frontend form
- Successful or Error Message after running mysql code in functions.php
- Auto crop images in WordPress
- Trying to make php run in a post
- How to add values to media “whitelist_options” in wp-admin/options.php template?
- WordPress Site Running Extremely Slow on Dedicated Server
- Can you run WordPress on a MarketLive/Java EE server?
- filter default query to show just selected level of child pages in wordpress
- Set meta field to publish date + 2 weeks
- Redirect undesirable domain
- Trying to install wordpress locally with mamp, but have unsupported php version
- Incorrect amount of posts returned when filtering related Woo products by custom taxonomy
- How to optimize the IF condition with many conditions and same output [closed]
- Show latest posts in a plain HTML website custom widget [closed]
- How to list posts from a plugin taxonomy?
- Creating Database Table vs. Adding MetaData to Post & User
- How to put a form with php code into a variable or shortcode?
- WordPress redirect redirecting too many times or not at all
- how to prevent wordpress admin from logging in via woocommerce my-account page
- how can i add class or span tag at sprintf?
- Need to Modify a WordPress Shortcode with another wordpress shortcode
- Problem with custom loop and wp_list_pluck [closed]
- How can I get plugin meta data without knowing the plugin folder?
- Permalinks: site.com/post-tite vs site.com/post-id/post-title for SEO and Speed
- Plugin: Front-end Editor – User role specific editable content?
- Flatten Responses returned via WP REST API via WP_Error for obfuscation
- Background image no longer fits to screen now that project is in php files
- How to add a shortcode which runs a .php file for the current post
- How to Create Carousel Indicators in PHP Loop using wp_get_attachment_url function?
- PHP session not staying alive. headers already sent
- how can I call a function when time expire
- Google CSE Malfunctions via Chrome/Safari on Mobile When Clicking on Either Search Icon/Menu Icon. How to Make Google CSE Default Theme Search
- Can an AJAX callback function access a PHP variable which was defined during initial page load?
- Latest posts feed with a specific post always first
- WordPress Post undefined error with Post Date (New to Wordpres Dev)
- Move Jquery.js to Footer
- Updating the database after parsing CSV document
- Attaching an upload to a user
- Change home_url in searchform.php to go to HTTPS instead of HTTP
- can’t grab PHP $_POST variable
- Loop 1 user randomly
- Wp_mail doesnt work
- Use WP_Query Data In Cookie
- Sort by multiple options in custom field
- Is custom behaviour possible when asynchronously uploading?
- How can I show only if custom field has content [closed]
- Top menu disapears in Category Pages when filtering using ACF
- doubled content
- Adding if statement to content for homepage
- Tables not showing divs and loop/php items
- Keeping the previous get value and add another value when submitted
- How to add active class dynamically
- Setting WooCommerce currency programmatically
- Submit cf7 form to cfdb as pdf/BLOB [closed]