Reputation: 2584
I am working with the following php line of code
$author = apply_filters( 'display_posts_shortcode_author', ' <span class="author">| ' . get_the_author() . ' | Comments: ' . get_comments_number() . '</span>', $original_atts );
I am modifying a wordpress plugin and when called this line outputs the author and comment count of a post. I want to add the font awesome comment bubble (fa-comment "\f075") after the | Comments:
part.
How can I do this?
FYI I am a complete noob with php.
Upvotes: 0
Views: 1766
Reputation: 22949
The html for that icon is:
<i class="fa fa-comment" aria-hidden="true"></i>
You can add it to the php code you have like this:
$author = apply_filters( 'display_posts_shortcode_author', ' <span class="author">| ' . get_the_author() . ' | Comments: <i class="fa fa-comment" aria-hidden="true"></i>' . get_comments_number() . '</span>', $original_atts );
Upvotes: 1