follow up to redirect button

Home Forums Legacy Support Support queries Setup issues follow up to redirect button

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #375780
    MeesterGijs
    Spectator
    Hello, So we closed this ticket because we fixed the wish/issue I had. But I forgot that the homepage has different styling for certain devices. So now the redirection of the button still doesn't work on tablet and phone because it's a seperate button. How can I make the code work or add code for the button for smaller devices? AS you can see in this image, or log in and check backend of homepage, I have three buttons that are shown on different sizes of screens/devices. This was the 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 } }); Please help me make the code work for the same button on all devices. Thanks! Gijs
    #375801
    Veronica
    Moderator
    means are you trying to say that you have set different layouts for different devices? if yes then please share all with us as may be the CSS classes will be different from each other that's why in that case we need to add classes to the above code
    #375851
    MeesterGijs
    Spectator
    This reply has been marked as private.
    #375946
    MeesterGijs
    Spectator
    Dear Veronica, Could you please give it a try? Creds in private post above. Thank you so much. Gijs
    #375953
    Veronica
    Moderator
    thanks for reminding checking on your site
    #375954
    Veronica
    Moderator
    add_action('wp_footer',function(){
    	if(is_user_logged_in()){
        ?>
        <script>jQuery(document).ready(function(){jQuery('a.ubtn-link.ult-adjust-bottom-margin.ubtn-large').attr('href','https://meestergijs.nl/cursusaanbod/');	});</script>
        <?php
        }
    });
    remove the old one and add this one tested on your live site and it is working on mobile/tab/pc view
    #376001
    MeesterGijs
    Spectator
    Yes, you've made my week. This is working now on all devices. Great work! Let's close (while dancing) Gijs
    #376009
    Veronica
    Moderator
    😁 great closing this one
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘follow up to redirect button’ is closed to new replies.