• Resolved Rahim

    (@rahimvaziri)


    HI Schea,
    Hope you are fine. πŸ™‚

    Fist of all thank you so much for your great plugin.

    I have added an snippet via your plugin:

    add_action( 'wp_head', function () { ?>
    <script>
    
    jQuery(document).ready(function(){
    jQuery('.cb.chp.db').addClass('digits-login-modal').attr('type',1);
    });
    
    </script>
    <?php } );

    Is there any chance to have this only for logged out users (visitors) and not logged in users?

    Kind Regards,
    Rahim

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    Definitely! Here’s how you can do it:

    add_action( 'wp_head', function () {
    	if ( is_user_logged_in() ) {
    		return;
    	}
    ?>
    <script>
    
    jQuery(document).ready(function(){
    jQuery('.cb.chp.db').addClass('digits-login-modal').attr('type',1);
    });
    
    </script>
    <?php } );
    Thread Starter Rahim

    (@rahimvaziri)

    Thank you Schea,
    It worked.

    I think it’s not a bad idea to add this feature in the core of the plugin.
    So users can manage the snippets much more than before.

    Kind regards. πŸ™‚

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Function for visitors’ is closed to new replies.