{"id":177703,"date":"2010-10-26T08:00:00","date_gmt":"2010-10-26T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/2024\/02\/22\/top-authors\/"},"modified":"2015-06-10T18:09:00","modified_gmt":"2015-06-10T18:09:00","slug":"top-authors","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/top-authors\/","title":{"rendered":"Top Authors"},"content":{"rendered":"<p>Top authors allows yoy to list your top authors with plenty of options. You can set the following in each widget:<\/p>\n<ul>\n<li>Widget title<\/li>\n<li>Roles to exclude<\/li>\n<li>Post types to include<\/li>\n<li>Authors to show<\/li>\n<li>4 Preset display templates<\/li>\n<li>Custom display template that allows you to create a completely custom structure and modify the output before and after the list.<\/li>\n<li>Archive (category\/tag\/taxonomy) specific author lists<\/li>\n<\/ul>\n<p>For a more detailed description of how you can set up custom author lists take a look at the other notes section. The plugin also has some developer friendly features, take a look at the other notes section for more.<\/p>\n<h4>Thanks<\/h4>\n<ul>\n<li><a href=\"https:\/\/twitter.com\/sebvandijk\" rel=\"nofollow ugc\">Seb Van Dijk<\/a> for donating this plugin to me for free, I owe you one \ud83d\ude42<\/li>\n<li><a href=\"http:\/\/fortawesome.github.io\/Font-Awesome\/\" rel=\"nofollow ugc\">Font Awesome<\/a> for the plugin icon<\/li>\n<\/ul>\n<h4>Usage<\/h4>\n<p>Most of the options for the plugin are self explanatory, I thought I\u2019d highlight the archive specific authors and the display template.<\/p>\n<p>If Archive specific authors is checked the plugin will handle authors differently on category, tag and taxonomy archive pages. It will narrow the posts down to only those in the given archive. Practically this means the following:<\/p>\n<p>Say John wrote 10 posts on the website and Jill wrote 5. On normal pages John would be listed first, Jull would be listed second. However, John wrote 3 posts in the \u201cFood\u201d category while Jill wrote 4. On the archive page for the \u201cFood\u201d category \u2013 if Archive specific authors is checked \u2013 Jill will be shown first with 4 posts and John second with 3.<\/p>\n<p>When you select \u201cCustom Structure\u201d as the preset display you should see three new fields: Display Template, Before List and After List. These fields can be used to control the HTML display of your authors. To make sure you can use the data retireved by the widget I\u2019ve added placeholders which will be replaced by real data:<\/p>\n<ul>\n<li>%posts_url%: The URL to the user\u2019s post archive page<\/li>\n<li>%website_url%: The URL to the user\u2019s website<\/li>\n<li>%gravatar_SIZE%: The gravatar of the user at the given size. For example, to display a 50px Gravatar your would use %gravatar_50%<\/li>\n<li>%firstname%: The user\u2019s first name<\/li>\n<li>%lastname%: The user\u2019s last name<\/li>\n<li>%displayname%: The user\u2019s display name<\/li>\n<li>%username%: The user\u2019s username<\/li>\n<li>%post_count%: Number of posts<\/li>\n<li>%meta_FIELD%: Displays the given meta field. If you store a user\u2019s Twitter name in the \u2018twitter\u2019 meta field you could use %meta_twitter% to display it.<\/li>\n<\/ul>\n<p>As of 1.0.9 there is also a custom ID field. This is for advanced use, mainly for developers. It allows for custom CSS stylings and even custom queries on a widget-to-widget basis.<\/p>\n<h4>For Developers<\/h4>\n<p>Currently there are three filters you can use to control the options available in the widget.<\/p>\n<ul>\n<li><code>ta\/usable_roles<\/code> allows you to change the roles that can be selected. It should return an array of roles in the form of slug=>name<\/li>\n<li><code>ta\/usable_opst_types<\/code> allows you to change the post_types that can be selected. It should return an array of post type objects<\/li>\n<li><code>ta\/post_query<\/code> allows you to modify the arguments of the WP_Query which retrieves the posts that we look up the authors for. Modify the arguments if you want to force category-specific top authors on single post pages, or other similar uses<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A highly customizable widget that allows you to display the top authors of your website easily.<\/p>\n","protected":false},"author":65,"featured_media":358890,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Top Authors - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"A highly customizable widget that allows you to display the top authors of your website easily."},"footnotes":""},"categories":[1],"tags":[935,34,619,542,120],"class_list":["post-177703","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-authors","tag-gravatar","tag-list","tag-posts","tag-widget"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/177703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=177703"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/177703\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/358890"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=177703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=177703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=177703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}