Custom blockquote with get_avatar background
-
Hi,
I’m trying to define a custom blockquote class called “author”, the aim is to have it displaying a picture of the author of the post, along with the name and below that the actual quote.
Ideally I’d love it to work as easy as the author just puts
<blockquote class="author">Quote goes here</blockquote>
in and it displays their avatar and name through CSS (I have multiple authors on the site so needs to be automated).I’ve been looking around and I wanted to define a background URL for the class which would be the URL to the Gravatar (get_avatar?), but couldn’t find an appropriate snippet (if even possible?) or how to implement it. Also would love to grab the name of the author and display that as well, maybe using something like:
.author:before { content: "get the author name(somehow?)" }
Please excuse my ignorance if this is totally the wrong way to go about it, any help would be highly appreciated!
Edit: I figured I could possibly use
<?php echo $grav_url; ?>
but it won’t display (and when used within content: it only displays as a code snippet).
- The topic ‘Custom blockquote with get_avatar background’ is closed to new replies.