Given that there are no filters in the theme that you could manipulate, this is a bit tougher but you can alter the logout URL in general with the logout_url filter:
function hack_logout_url_wpse_193113($logout_url, $redirect) {
$logout_url = parse_url($logout_url);
if (!empty($logout_url['query'])) {
parse_str(html_entity_decode($logout_url['query']),$qry_str);
$qry_str['redirect_to'] = urlencode(home_url());
}
$logout_url['query'] = build_query($qry_str);
$ret="";
foreach ($logout_url as $k=>$v) {
switch ($k) {
case 'scheme':
$ret .= $v.'://';
break;
case 'host':
case 'query':
$ret .= $v;
break;
default :
$ret .= $v."https://wordpress.stackexchange.com/";
}
}
return $ret;
}
add_filter('logout_url','hack_logout_url_wpse_193113',10,2);
echo wp_logout_url(get_permalink());
Related Posts:
- How To Activate Plugins via Code?
- dbDelta only creates the last table
- Combine multiple plugins into one?
- Security and .htaccess
- Facebook comments box on front page
- Changing Woocommerce Product Description [closed]
- Where should my plugin POST to?
- How would implement StackExchange ‘Questions with similar titles’ for the FAQ on my wordpress site
- Plugins error (Use roles and capabilities instead) on latest version, multisite
- Alternative default avatar generator?
- Meteor Slides as header only for homepage and Use featured image of each page as header for respective pages
- Plugin to install a plugin
- Plugin set default setting value when it activated
- Get all options saved by another plugin
- What’s the point of using WordPress’s built in admin-ajax.php?
- WP Crowdfunding customization [closed]
- I need some direction on how to have a sidebar based on meta rather than page
- Add Image to the RSS plugin reader from another RSS [closed]
- Improving a Stackoverflow “inspired” badge system to display badges in author page
- Override plugin with functions.php
- Get the url of the full sized attachment image using post ID?
- Getting Post details when post is published
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- How to display sub categories under products page using woocommerce with mystile theme [closed]
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Post-terms-order PHP errors after update
- Do I still need a theme to use page builders?
- Plugin Options Not Saving to Database in WP 4.5
- Standard Fail2Ban vs. WP Fail2ban vs. WP Fail2Ban Redux
- Install (enable) plugins on multisite, on localhost
- Individual testimonial taxonomy not displaying (white screen)
- Plugin init hook fires repeatedly
- Is there any hook for theme activation ? or something similar?
- Insert Array in Plugin Database
- Checking if a woocommerce attribute is set
- How to update mu-plugin
- What are the performance hiccups when building plugins?
- Add Content to Content()
- Where is my google maps on my page? [closed]
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- plugin wraps the entire content
- Shortcode Attributes to Return different $_POST
- How do I change where a plugin pulls updates from?
- Remove value from array within post meta ajax admin
- how get curent URL slug from archive page [closed]
- How programatically cause uploads folder to be created?
- Hook on creating a menu entry?
- Where should I store disabled plugins?
- Images not appearing after applying Smush
- Identify User Language, Redirect to the corresponding page and Save the chosen language as Cookie
- Enable comments pagination only amp page
- Display top level parent category as a single product body class (Woocommerce)
- Allow a particular user to access a particular plugin?
- Change the address of the music player if not available
- WordPress disable direct access of files in WordPress installation path
- disable plugin activation on no multisite
- How to Add call button on a featured image in a wpsite? check the slap king image, there are two buttons on the featured image
- WordPress hierarchy clarification, does post_type_archive take precedence over taxonomy-term archive?
- Add style to body based on url
- How to check for already existing plugin versions on activation? and prevent errors
- update_post_meta is not working for me when I use e.preventDefault for update button
- How to create a plugin with automatic update?
- Is it possible to have permalinks to sub-domain pages and to root pages within one single WP instance?
- jQuery works instead of $
- WordPress create thumbnails on demand
- How user can download a specific file?
- Scheduled cron event removed from list automatically after sometime
- Geotargeting plugins never work
- Plugin management with my custom plugin
- How to allow editors to only edit certain categories?
- How to pass value from WordPress to Javascript
- 504 Timeout gateway when trying to pay for an order in Woocommerce. What else can I do?
- How do I create a state of “don’t assign anything to variable” if WP_Error throws an error?
- Get not the full path
- Plugin communication between sites that use it?
- Being hacked. Is there a list of WordPress security holes I can check against?
- Is a Virus detection plugin necessary?
- ound this in Where to edit Custom Content fields to optional if there is no plug in?
- How to add a meaningful link in plugin admin panel?
- How to set up php,javascript and css to allow for our finished product to be displayed within a page?
- jQuery loaded in wrong order for non-admin page views only
- Adding custom cron_schedule prior to wp_schedule_event
- Capturing POST data
- Advanced Custom Fields Plugin – not displaying images
- WP-PostRatings – how to make rating show up?
- why i cannot see some plugins while they are enabled on network admin page?
- wordpress Search function is not working
- Auto play audio using WP Maintenance Mode Plugin [closed]
- Plugin to allow for recurrent subscription + exclusive content
- How to automatically convert “normal” conditions to yoda conditions
- Woocommerce Large Variations Shows Out of Stock Items [closed]
- SSL not working for checkout
- Plugin LDAP Authentication 2 In stallation ploblem
- woocommerce how to get cat id in content-product.php
- How to use WP-reCAPTCHA on a form
- Why is my menu page not being displayed?
- stop resize button for wordpress media
- Mixed results with is_page() WordPress function, when using $this, or self
- I have created a custom plugin. After activation it creating page but i am not getting how to add another php file at page content?
- HTML output from WordPress shortcode is wrapped in unexpected tags