WordPress.org

Ready to get started?Download WordPress

Forums

WP About Author
[resolved] Add a mailto for author email address? (3 posts)

  1. Joe Ross
    Member
    Posted 3 years ago #

    I see a mention of email in your wp-about-author.php code but I don't know PHP very well. Is there a way to add the author email to the "Website - Twitter - Facebook - More posts" link list?

    http://wordpress.org/extend/plugins/wp-about-author/

  2. Jon Bishop
    Member
    Plugin Author

    Posted 3 years ago #

    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

  3. Joe Ross
    Member
    Posted 3 years ago #

    Thanks for the response, that'll do.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic