WordPress.org

Ready to get started?Download WordPress

Forums

User Photo
Displaying default photo (2 posts)

  1. absNzyg
    Member
    Posted 1 year ago #

    Hi,

    I am trying to display a default or no photo image when the user has not uploaded a photo of his/her own. My code is

    <?php
    	if(userphoto_exists($curauth))
        	userphoto($curauth);
    	else
        	echo '<img src="images/signer.jpg" alt="No Photo" />';
    		?>

    I am having success with the "if" part but not "else." The image is not getting displayed because I am not getting the uri right (the alt text is working though). I have used the get_stylesheet_directory_uri() function in the past to get absolute path. But I am not getting it right within the "echo" command.

    I don't know PHP at all so kind of tired of all the permutations and combinations. Any help will be appreciated. Thanks.

    http://wordpress.org/extend/plugins/user-photo/

  2. absNzyg
    Member
    Posted 1 year ago #

    Hi,

    Any suggestion anyone?? Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic