send logged in members to different homepage

Home Forums Legacy Support Support queries How-to & Troubleshooting send logged in members to different homepage

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #240007
    MeesterGijs
    Spectator
    Hello, I was wondering if it's possible to send logged in members to a different homepage with same url (meestergijs.nl)? I read this, tried it, but it didn't work. Or it worked for 2 seconds and then it didn't work anymore.. I would like logged in members to see different stuff at meestergijs.nl than non logged-in members.   Gijs
    #240059
    logan
    Member

    Freind,

    try this code:

    add_action('template_redirect','custom_redirect_to_different_page',99999);

    function custom_redirect_to_different_page(){

      if(is_user_logged_in() && is_front_page() || is_home()){

          wp_redirect('http://www.vibethemes.com');

        exit;

      }

    }

    #240146
    MeesterGijs
    Spectator
    Logy Logan!! How are you? It works! I did get an error when adding the code in admin. So I used sftp. That worked. :) You can close this one. Gijs
    #240161
    Misty
    Member
    Glad you’re enjoying the theme & support – thanks for using it! 🙂 Please write your review. I would really appreciate that! Here: https://themeforest.net/item/wplms-learning-management-system/reviews/6780226 If we can be of assistance, please do not hesitate to contact us again. Closing this topic. Have a Great Day.
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘send logged in members to different homepage’ is closed to new replies.