Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: How do I....list categories an author has wrote in on author.php

Started 1 month, 2 weeks ago by queesy
scenario: a site with multiple authors. I click into a page about this author, and i want to see a list of categories this author has wrote in. how do i do this? im pretty stumped here. also how do i link to those categories?
Site: WordPress Support  WordPress Support - site profile
Forum: How-To and Troubleshooting  How-To and Troubleshooting - forum profile
Total authors: 5 authors
Total thread posts: 30 posts
Thread activity: no new posts during last week
Domain info for: wordpress.org

Other posts in this thread:

MichaelH replied 1 month, 2 weeks ago
Since you are using Author Templates you just need to create an array of all the categories from get_the_category(), as you loop through a given author's posts. Related: http://php.net/manual/en/language.types.array.php Function_Reference/get_the_category

queesy replied 1 month, 2 weeks ago
i still cant seem to come up with a way to make this work=\

MichaelH replied 1 month, 2 weeks ago
Well at least start here: http://wordpress.org/support/topic/327359

queesy replied 1 month, 2 weeks ago
@michaelH sorry about the duplicate i couldnt find the older one, thank you for closing it. ================================================== ===================== Hello! my website: ampersandbox.net/?author=2 Basically on every author's page I would like to display a list on the right side of categories the current author has contributed to (has written a post in) I'm not sure how to ...

queesy replied 1 month, 1 week ago
still wasnt able to achieve this not much of a php coder =\

MichaelH replied 1 month, 1 week ago
<?php //get all posts for an author, then collect all categories //for those posts, then display those categories $cat_array = array(); $args=array( 'author' => 4, 'showposts'=>-1, 'caller_get_posts'=>1 ); $author_posts = get_posts($args); if( $author_posts ) { foreach ($author_posts as $author_post ) { foreach(get_the_category($author_post->ID) as $category) { $cat_array[$...

queesy replied 1 month, 1 week ago
thanks michael! thats definitely doing something however it looks like its just listing all the categories i have not specific ones the author has posts in. but i will keep working at it thank you! ampersandbox.net/?author=2

queesy replied 1 month, 1 week ago
open to solutions or alternatives im pretty stumped.

t31os_ replied 1 month, 1 week ago
Just create some links.. http://ampersandbox.net/?author=2&cat=1 - working example link Wordpress will sort out getting the posts that match for you..

queesy replied 1 month, 1 week ago
WOW i did not know you could do that thank you so much I will fool around with your idea and see if i cant come up with something thank you =)

 

Top contributing authors

Name
Posts
queesy
13
user's latest post:
How do I....list categories an...
Published (2009-11-19 15:32:01)
thank you so much t310s =)
t31os_
10
user's latest post:
How do I....list categories an...
Published (2009-11-27 11:44:03)
http://wordpress.pastebin.ca/1689688 Fixed a few invalid areas, and commented out code not being used... Not entirely sure what your intended result is, but try the above and report back please..
MichaelH
3
user's latest post:
How do I....list categories an...
Published (2009-11-06 21:46:05)
&lt;?php //get all posts for an author, then collect all categories //for those posts, then display those categories $cat_array = array(); $args=array( 'author' =&gt; 4, 'showposts'=&gt;-1, 'caller_get_posts'=&gt;1 ); $author_posts = get_posts($args); if( $author_posts ) { foreach ($author_posts as $author_post ) { foreach(get_the_category($author_post-&gt;ID) as $category) {...
henrik@worsoe.eu
3
user's latest post:
How do I....list categories an...
Published (2009-11-25 04:02:53)
I have removed the bottom code now without any harm done :-) The file the code is placed in is in profile-pic/author.php (a Profile Pic plugin).
kordellas
1
user's latest post:
How do I....list categories an...
Published (2009-11-24 22:02:53)
This script it's great. What I was looking for! Can you please help me and make it to show only the child categories instead of all categories? I read something about depth but i did not manage to make it right...

Related threads on "WordPress Support":

Related threads on other sites:

Thread profile page for "How do I....list categories an author has wrote in on author.php" on http://wordpress.org. This report page is a snippet summary view from a single thread "How do I....list categories an author has wrote in on author.php", located on the Message Board at http://wordpress.org. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity