• Resolved lotionstarlord

    (@lotionstarlord)


    Trying to add a custom condition for if the user is logged in.
    Here’s what I’ve put in my theme’s functions.php

    add_filter( ‘pum_get_conditions’, ‘pum_user_logged_in_condition’ );
    function pum_user_logged_in_condition( $conditions ) {
    return array_merge( $conditions, array(
    ‘user_logged_in’ => array(
    ‘group’ => __( ‘General’ ),
    ‘name’ => __( ‘User is Logged In’ ),
    ‘callback’ => ‘is_user_logged_in’,
    ),
    ) );
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter lotionstarlord

    (@lotionstarlord)

    Unrelated issue was fixed and it’s working.

    i tried to add the following to my functions
    add_filter( ‘pum_get_conditions’, ‘pum_user_logged_in_condition’ );
    function pum_user_logged_in_condition( $conditions ) {
    return array_merge( $conditions, array(
    ‘user_logged_in’ => array(

    ‘callback’ => ‘!is_user_logged_in’,
    ),
    ) );
    }
    but it is not working I would like to hide the popups from the login users
    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Conditions Not Showing in Popup Edit Page’ is closed to new replies.