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();
}

 317 total views,  1 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
  • 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
  • In this topic i would like to share code change add to cart button text on woocommrce Please go to file function.php, Apearace > Theme Editor // Change add to cart text on single product pageadd_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_add_to_cart_button_text_single' );function woocommerce_add_to_cart_button_text_single() {return __( 'add to cart', 'woocommerce' );}// Change add to…
    Tags: add, button, function, theme, editor, file, code, knowledge, website, wordpress

Categories: