WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: WP About Author] Add a mailto for author email address?

[Resolved] [Plugin: WP About Author] Add a mailto for author email address?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jon Bishop
    Member

    @jonbishop

    Try adding the following code to wp-about-author.php

    if(!empty($wp_about_author_author['facebook'])){
    	if($wp_about_author_link!=""){ $wp_about_author_link .= "- "; }
    	$wp_about_author_link .= "<a href='" . $wp_about_author_author['facebook']. "' title='". $wp_about_author_author['name'] ." on Facebook'>Facebook</a> ";
    }
    
    // Add this //
    if(!empty(get_the_author_email())){
    	if(get_the_author_email()!=""){ $wp_about_author_link .= "- "; }
    	$wp_about_author_link .= "<a href='mailto:" . get_the_author_email() . "'>Email</a> ";
    }
    // End adding code //
    
    if(!empty($wp_about_author_author['posts_url'])){
    	if($wp_about_author_link!=""){ $wp_about_author_link .= "- "; }
    	$wp_about_author_link .= "<a href='" . $wp_about_author_author['posts_url']. "' title='More posts by ". $wp_about_author_author['name'] ."'>More Posts</a> ";
    }

    I want to make it easier to customize the box in the future but for now this will have to do

    Thanks for the response, that’ll do.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: WP About Author] Add a mailto for author email address?’ is closed to new replies.