You are using PHP tag inside echo statement.
Try this:
echo '<a href="'.wp_logout_url().'" title="Logout">Logout</a>';
If you want to redirect to any specific url then you can pass it as argument of wp_logout_url
.
Check official documentation of wp_logout_url
.
Note :
It is recommended to return value from the shortcode function rather than directly displaying it. Try return
instead of printing output by echo
.
Related Posts:
- How to have WordPress send a user confirmation/validation email on signup
- How can i force Display names to be the same as Usernames?
- How can a Firebase user registration and login be integrated into a WordPress site?
- How to get user-meta from Social Login registered users?
- How to create custom LOGIN and REGISTRATION forms?
- How to turn off email you receive when registered?
- Registration Form Validation in wordpress
- Getting User email on logout. wp_logout
- Will WordPress username displayed somewhere in the site?
- What plugin should I use for a basic user signup/login system [closed]
- How to display public user profile with 2 additional fields? (GitHub source code included)
- Upload files programmatically to users
- Is there any good tutorial to write custom login, registration and password recovery forms? [closed]
- action-scheduler vs wp-background-processing
- Displaying a Welcome Message to a Woocommerce User
- Average Account Age
- Form doesn’t submit on second submit call
- How to save additional user data as part of the registration process?
- WordPress Registration Email by Role
- Add a captcha form to the woocommerce register form
- WordPress Central User Database
- wp_set_auth_cookie causes 403 error in the wooCommerce checkout
- WordPress Keeps Logging Out – What Tests Can I Run to Solve This?
- Create custom registration form for WordPress Multisite
- User registration
- WordPress Integration with Google Groups
- Users are being redirected to main site when trying to register on subsite of my Multisite network
- Preventing My Plugin From Being Used For Free
- easy steps to make front end form without plugin
- How to create multiple users at once?
- Using WordPress to build membership Page
- The add_action(‘register_form’) isn’t effecting my registration form
- How to find the Registration page
- Best practices for user registration with WordPress from an MVC background
- How can I apply no-disposable when programmatically adding a user with wp_insert_user()?
- Different registration form for different roles
- Structuring function with registration_errors hook
- How to automatically activate users after registration without activation email?
- Linking form to user meta fields
- Changing the Default New User Notification Email
- How to add Mobile field in Registration form using Theme my login Plugin
- Unable to update plugins or log out
- Searchable Semi Random Number Generator on User Profiles
- Saving data only when payment is successful
- Create password protected page, no registration
- User / membership Plugin [closed]
- Overwrite user role
- Custom Widget not Available after Plugin Installation
- Users Ultra: Hide asterisk for required registration fields?
- How set role at registration based on email?
- Private WordPress blog, requires user registration approval, and allowing users to login with OpenID
- Plugin De/Activation Not Firing On MultiSite install
- What plugin(s) are best for this User registration task? [closed]
- Buddypress Plugin for register user from other site’s [closed]
- custom registration form [duplicate]
- I want to remove the register/login WordPress top bar from my website
- User register hook can’t access form request
- Creating a full business website
- Need a Plugin to create a registration form for my website? [closed]
- WordPress s2 member plugin not working [closed]
- WordPress isn’t sending welcome email with the password reset
- WordPress User Registration/ Sign Up -> Able to take Paid Certification Courses & keep track of Completed Certificates
- Issues with creating user profile for a subscriber, but with different profile page and functionalities
- Woocommerce – Specific template for product category? [closed]
- WooCommerce – How to Add a Custom Field to Cart Items and Cart Totals [closed]
- How to parse nested shortcodes?
- Custom wp_nav_menu output (displaying all child elements of top menu element in current branch)
- Dynamic homepage according to user role
- How to extract images of post and pages excluding header and logo image in wordpress?
- Dropzone.js and wordpress plugin
- Email Bounce Address
- Installing Jplayer in WordPress
- Does plugin’s uninstall.php file have access to the plugin ‘s object?
- Related posts widget or plugin needed
- Implementing an “Email this” button?
- Use conditional logic for woocommerce variable product
- How to customize a title by passing query string?
- Get param from shortcode in plugin function
- Change website directory safely to add a static page on startup
- jQuery(‘#news-ticker’).cycle is not a function
- Looking for a photo management solution
- How to display an alert when deleting a plugin?
- Import a folder containing HTML files and images to WordPress
- Can i stream data to a custom_post_type?
- Revolution Slider Toggle Devices not working
- automatically set random featured image by category in wordpress on post
- Using Shortcode Result In Custom HTML Block (Using Google Sheet JQuery Result As NumScroller data-max)
- How To Export User’s Custom Fields in CSV or XLSX
- Some resources of my website are pointing to www.mysite.com/dev/ and trying to get rid of that append has been a headache
- Is it possible to disable a theme programmatically?
- Disqus comments count taking long to update
- Escaping and sanitization
- How to save default values into an option and delete those upon actvation and deactivation in wordpress?
- Ajax, jQuery and WordPress
- PHP and Jquery pass value from form. Update function on DataBase
- No plugin updates after moving wp-config.php above root map
- Snippet displaying LearnDash parent course title with lesson title [closed]
- Want to show pop up image on home page every time when i refresh it [closed]
- woocommerce show cities state as dropdown list
- How does one add numbers to an admin menu?