Trying to create an attractive Author list
-
Trying to create a nicer Author list for compliance with Google news requirements.
The standard wp_list_authors is okay for sidebras but way to basic for page display.
Have created this which is half working but cannot include descriptions etc.
Would anyone care to take a look at the code annd help?
Problems seem to be revolving around use of get_the_author_meta as this does display but only the list of authors and avatars, not the description
<?php $authors = wp_list_authors('optioncount=1&exclude_admin=0&echo=0'); $authors = explode('<li>', $authors); foreach ($authors as $names) { $names = str_replace('</li>',"",$names); $idBeg = strpos($names,'author='); $post = substr($names, $idBeg); $idEnd = strpos($post, '"'); $id = substr($post, 0, $idEnd); $id = str_replace('author=',"",$id); if($id) { echo '<li>'; echo '<div class="avaright">'; echo get_avatar($id); echo '</div>'; echo get_the_author_meta('description',$id); echo '<div class="authname">'; echo $names; echo '</div>'; echo '</li>'; } } ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Trying to create an attractive Author list’ is closed to new replies.