Support Forum

Author posts tag

JS js
js
Member

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’

3 Answers

New Answer

MP Mr Papa
Mr Papa
Member

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…

JS js
js
Member

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? 

MP Mr Papa
Mr Papa
Member

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…