Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
Author posts tag
Avatar
js
Member
Free Members
sp_UserOfflineSmall Offline
Jul 3, 2012 - 12:53 am

Is it possible to use the author post tag or spAuthorPostsTag() on members profile page to display some of their posts? Seems like it should work but I am not sure the arg to add for 'authorId'

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 3, 2012 - 1:47 am

For a typical wp author archive page, you would want:

sp_forum_api_support();
sp_AuthorPostsTag('authorId='.$author);

you may not need the first line, but doesnt really hurt...

Avatar
js
Member
Free Members
sp_UserOfflineSmall Offline
Jul 3, 2012 - 7:40 pm

I tried to add this tag to showprofile template in my theme, no errors but it doesn't do anything either, can this tag only be used outside of the forum loop? 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 3, 2012 - 8:17 pm

It can be used anywhere you want... however, where you use it will dictate how you get the author ID... my example showed how you would get it from a wp author archive page... $author is only set up (by WP) on those types of pages...

so will show, but you have to be able to get the ID of the author you want where you show it...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626