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
- Is there a plugin or resource for custom implementation for OAUTH and regular user login?
- What forum plugin can I use to allow non-registered users to create posts and comment? [closed]
- wp_logout function not executed
- WPTouch – how to remove shortcodes or make shortcodes function
- Adding class to last list item? Not WP generated
- How to make custom plugin run on demand?
- Replacing global wp_query
- Making my plugin create a page?
- Maintaining plugin addons while upgrading
- Not One ‘Contact Form Plugin’ will send email // Work
- creating a plug in that would tap into save/update action of posts [closed]
- WordPress plugin won’t show on some themes
- what is name of this plugin used for photo gallery page [closed]
- Why can’t I call a (member) function from within a foreach?
- Is there a way to make the main page only display a brief description of the full article?
- Photo Gallery Plugin and Touch Devices
- How to change the post form from plugin?
- Plugin that will output submitted form data for user? [closed]
- Default taxonomy template in plugin, override in theme
- convert more tag to shortcode
- WordPress Plugins Don’t Automatically Update
- Turning on output buffering in a wordpress plugin
- Can plugin2 uninstall plugin1 at the very beginning of plugin2’s installation?
- Is there a plugin for uploading files such as PDF files?
- Simply poll & Events Calendar plugins clashing
- WordPress plugin Post Creation [closed]
- Register google jquery gets overwritten by plugin
- How to handle forms from sidebar widgets – Processing $_POST variables using get_field_name()
- WordPress plugin to auto execute php script on a specific time?
- WordPress Book Exchange Plugin Equivalent?
- Making that Admin Bar transparent or a blue color
- Use wp_upload_dir() correctly
- Which wordpress theme is compatible Optima Express theme (real estate inventory) plugin?
- Fullscreen gallery plugin [closed]
- Get ‘Headers already sent’ error for the plugin I am creating when I try to login
- Measure and limit file uploads
- WordPress Related Plugin – only show when related content