Auto click a shortcode link in wordpress

 if ( !(is_user_logged_in()) ) {
                ?>
               <script>
                $(document).ready(function() { 
                    $('#show_login').trigger('click');
                });
            </script>
            <?php echo do_shortcode('[ciusan_login]'); 
              } 

 do_shortcode('[ciusan_login]')= login link where id = show_login

I am trying to click this link automatically if the user is not logged in.but its not clicking that link . can any body help me.this code is in wordpress.


Source: wordpress

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.