1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

DIVI LOGOUT Module

Discussion in 'Free Divi Community Forum' started by Bob Jones, Nov 22, 2020.

  1. Bob Jones

    Bob Jones New Member

    I need to create a DIVI Logout module that will only be called if the user is logged in. I have the DIVI Login module working, but I need a corresponding Logout module that I can call from the menu. When the Logout button is pushed, the user will be taken to the website home age.

    Any recommendations on how to accomplish this?
     
    1. PRO MEMBER PERKS Divi Ultimate Header Plugin - Custom Divi Builder header on desktop + default slide in / fullscreen menu on mobile:Learn More
  2. protoSTERN

    protoSTERN New Member

    I think you will not need a module for this. Create a menu item with the link
    https://yourdomain.com/wp-login.php?action=logout

    Thats all.
     
  3. Bob Jones

    Bob Jones New Member

    1. PRO MEMBER PERKS Divi Mini Cart Pro Plugin - Instantly add 3 different types of mini cart to your Divi site:Learn More
  4. Divi.Help

    Divi.Help Administrator
    Staff Member

  5. protoSTERN

    protoSTERN New Member

    A Plugin like avove mentioned or the 'Peter's Login Redirect'-Plugin (much better cause of the name, as i am a Peter, too :).

    Or you use the simple code:

    add_action('wp_logout','auto_redirect_after_logout');
    function auto_redirect_after_logout() {
    wp_redirect( home_url() );
    exit();
    }
     
    Theodored likes this.
    1. PRO MEMBER PERKS Divi Block Pro - Premade logo carousel design for your Divi site without using any plugins:View Demo
  6. Theodored

    Theodored New Member

    Thanks Peter!