Can I dis­play all or re­cent me­dia cred­it­ed to a giv­en author?

In­deed, just call the tem­plate tag <?php display_author_media($author_id); ?> in your the­me’s author.php (or else­where, if you want). The tem­plate tag has op­tion­al pa­ra­me­ters if you want to cus­tomize the CSS or text. The de­fault op­tions will dis­play thumb­nails of the 10 most re­cent me­dia items cred­it­ed to the giv­en user float­ed to the right with a width of 150px and a head­er of <h3>Recent Media</h3>.

These op­tions can be changed with a more ver­bose call to the func­tion: <?php display_author_media($author_id, $sidebar = true, $limit = 10, $link_without_parent = false, $header = "<h3>Recent Media</h3>", $exclude_unattached = true); ?>. This will make on­ly the 10 most re­cent me­dia items that are at­tached to a post dis­play with the giv­en head­er tak­ing up the max­i­mum width it’s af­ford­ed. Each im­age will link to the post in which it ap­pears, or the at­tach­ment page if it has no par­ent post (un­less $link_without_parent is set to false). If you don’t care about whether the me­dia is at­tached to a post, change $exclude_unattached to false. This func­tion as a whole will on­ly dis­play me­dia up­loaded and cred­it­ed to a user af­ter this plu­g­in was installed.


mnd.sc-Admin

More posts

| | Posted in | Comments Off on Can I dis­play all or re­cent me­dia cred­it­ed to a giv­en author?
Comments are disabled for this post.