Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello csleh,
    If you wanted to check for the image with an “if exists” you can do the following:

    Example:

    // Retrieve The Post's Author ID
    $user_id = get_the_author_meta('ID');
    // Set the image size. Accepts all registered images sizes and array(int, int)
    $size = 'thumbnail';
    // Get the image URL using the author ID and image size params
    $imgURL = get_cupp_meta($user_id, $size);
    
    if ( !empty($imageURL) ) {
     // show the custom image
    } else {
    // do something else here
    }

    Thread Starter csleh

    (@csleh)

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘set a default image if user hasn't chosen one?’ is closed to new replies.