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
- What forum plugin can I use to allow non-registered users to create posts and comment? [closed]
- wp_logout function not executed
- Custom media upload content for inserting custom post shortcode
- How do I get WooCommerce to automatically recreate pages? [closed]
- Issues creating a tinyMCE plugin that creates a custom link
- What does do_action() function do in wordpress? [duplicate]
- “Are you sure you want to do this?” when deactivating all plugins in WordPress 4.3.1 [closed]
- how to redirect to my template
- Hidden Custom Post Type
- Theme or Plugin: Where should I write my code?
- Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
- How can I implement an Add to Collection function on my Image Gallery to be downloaded later?
- Add Piecemaker to WordPress Header
- Plugin updates from a specific location
- Calling plugin function inside custom plugin for onclick event
- How to fix wrong attribute error for Visual Composer Grid Builder?
- html generated by theme exist but doesnt appear in browser
- dirname( __FILE__) returning wrong directory inside plugin
- Use $_GET inside a shortcode print empty Array
- How to check if an email was sent from or originated from a specific plugin?
- Migrating WordPress – New domain entry, links broken
- Search Results Page filter by page title
- add_meta_box creating default form field types
- Effeciently adding Checkboxes to TablePress table cells
- WordPress Phone Field Check (use numbers, spaces and pluses)
- How to remove Unused CSS From a WordPress Theme?
- How to delete Crisp Chat plugin completely?
- Display plugin-generated content to override a placeholder page
- Members-only page, but accessible via sharable link
- Google trying to index child theme files
- Consume legacy rest api dependent upon WP API plugin
- How to Add Jquery FullCalendar in wp plugin in admin
- How to speed up installing plugins and upgrading WordPress
- WordPress check box unchecked on null value ternary operator [plugin development]
- Wrapping code in an if block
- Ajax Called in Plugin php file
- WordPress Website is very slow after migration