button redirect to different page for logged in visitors

Home Forums Legacy Support Support queries Setup issues button redirect to different page for logged in visitors

Viewing 14 posts - 31 through 44 (of 44 total)
  • Author
    Posts
  • #374841
    MeesterGijs
    Spectator
    I made you keymaster and no access.. I changed it to administrator and now you have access. Yes!
    #374905
    Anshuman Sahu
    Keymaster
    Hi im trying to login but creds not working : http://prntscr.com/20i270l
    #374952
    MeesterGijs
    Spectator
    This reply has been marked as private.
    #375256
    Veronica
    Moderator
    this is the correct code :
    add_action('wp_enqueue_scripts',function(){
    	if(is_user_logged_in()){
        ?>
        <script>jQuery(document).ready(function(){jQuery('a.ubtn-link.ult-adjust-bottom-margin.ubtn-left.ubtn-large').attr('href','https://meestergijs.nl/cursusaanbod/');	});</script>
        <?php
        }
    });
    #375311
    MeesterGijs
    Spectator
    This reply has been marked as private.
    #375412
    Veronica
    Moderator
    checking the code again
    #375414
    Veronica
    Moderator
    hi please check now, in the above code, we have changed the action to wp_footer and now it is working you can check and confirm here
    #375417
    MeesterGijs
    Spectator
    When I add the code to wplms footer it still doesn't work. How come? Can you log in and add the code and check? <script> add_action('wp_enqueue_scripts',function(){ if(is_user_logged_in()){ ?> <script>jQuery(document).ready(function(){jQuery('a.ubtn-link.ult-adjust-bottom-margin.ubtn-left.ubtn-large').attr('href','https://meestergijs.nl/cursusaanbod/'); });</script> <?php } }); </script>
    #375467
    Veronica
    Moderator
    ooh dear I mean to say change the action to wp_footer:
    add_action('wp_footer',function(){
    if(is_user_logged_in()){
    ?>
    <script>jQuery(document).ready(function(){jQuery('a.ubtn-link.ult-adjust-bottom-margin.ubtn-left.ubtn-large').attr('href','https://meestergijs.nl/cursusaanbod/&#8217;); });</script>
    <?php
    }
    });
    #375469
    MeesterGijs
    Spectator
    This reply has been marked as private.
    #375557
    Veronica
    Moderator
    ok let me check this on your site
    #375558
    Veronica
    Moderator
    hi this is the final code::
    add_action('wp_footer',function(){
    	if(is_user_logged_in()){
        ?>
        <script>jQuery(document).ready(function(){jQuery('a.ubtn-link.ult-adjust-bottom-margin.ubtn-left.ubtn-large').attr('href','https://meestergijs.nl/cursusaanbod/');	});</script>
        <?php
        }
    });
    already added the code in wplms-customizer.php and it is working on both production and live site please check now confirm
    #375563
    MeesterGijs
    Spectator
    Yes! Finally. That's great. Thank you so much. This was so needed. The text of button was so unlogical for logged in members that would click it. Now, with the redirect, it makes sense! Perfect :) let close, finally. Have a great day
    #375619
    Veronica
    Moderator
    good to know this helps closing this one
Viewing 14 posts - 31 through 44 (of 44 total)
  • The topic ‘button redirect to different page for logged in visitors’ is closed to new replies.