Some environment need to redirect page to another page after logout, We try to test with function and it working,

We would like to provide step for add code to rediect page after logout on wordpress

Go to WP backend > Appearance > Theme File Editor

On right side bar click functions.php

Please past the code below to functions.php and click Update file button, In example below we redirect to home page after logout wordpress

add_action(‘wp_logout’,’auto_redirect_after_logout’);
function auto_redirect_after_logout(){
wp_redirect( home_url() );
exit();
}

 383 total views,  2 views today

Related Posts

  • today we would like to provide step about how to download plugin from wordpress, Plugin on wordpress that help you to simple for improve your website, Go to the backend wordpress and click plugin menu on the left side bar we will found plugin page, Please click Add New button…
    Tags: wordpress, click, button, website, wp, knowledge
  • So i think some theme of wordpress with plugin woocommerce that show relate products label on single product page wrong postion, We try to using CSS for adjust this label to correct position and it working Before use CSS code for adjust relate products label CSS Code.related.products {float: left!important;} After…
    Tags: code, working, wordpress, theme, knowledge, website
  • Someone need to change about text on place order button for support requirement per your company, this solution will help you to fix it Go to backend admin page > Appearance > Theme File Editor > Function.php /**Woocommerce change text on place order buttton*/add_filter( 'woocommerce_order_button_text', 'custom_button_text' );function custom_button_text( $button_text )…
    Tags: file, function, editor, theme, appearance, backend, button, website, knowledge, wordpress
  • In this topic i would like to share code change currency symbol on woocommrce Please go to file function.php, Apearace > Theme Editor add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);function change_existing_currency_symbol( $currency_symbol, $currency ) {switch( $currency ) {case 'USD': $currency_symbol = 'USD'; break;}return $currency_symbol;}
    Tags: function, editor, theme, file, code, knowledge, website, wordpress
  • We would like to provide CSS code for custom woocommerce button in wordpress This code help you to custom color on button for your website /* woo button ****/.woocommerce #content input.button.alt:hover, .woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover, .woocommerce-page #content input.button.alt:hover, .woocommerce-page #respond input#submit.alt:hover, .woocommerce-page a.button.alt:hover, .woocommerce-page button.button.alt:hover,…
    Tags: knowledge, website, wordpress

Categories: