Add the new custom field to the author profile
function my_epl_custom_user_contact( $contactmethods ) {
$contactmethods['custom'] = __( 'Custom', 'easy-property-listings' );
return $contactmethods;
}
add_filter ('user_contactmethods','my_epl_custom_user_contact',10,1);
Create the HTML output of the Custom Fields
function my_epl_get_custom_author_html($html="") {
global $epl_author;
if ( $epl_author->custom != '' ) {
$html="
<a class="epl-author-icon author-icon custom-icon-24" href="http://custom.com/" . $epl_author->custom . '"
title="'.__('Follow', 'easy-property-listings' ).' ' . $epl_author->name . ' '.__('on Custom', 'easy-property-listings' ).'">'.
__('C', 'easy-property-listings' ).
'</a>';
}
return $html;
}
Add the custom field filter
function my_epl_custom_social_icons_filter( $html ) {
$html .= my_epl_get_custom_author_html();
return $html;
}
add_filter( 'epl_author_email_html' , 'my_epl_custom_social_icons_filter' );