Support Forum

Shortcodes

DE Dre Erwin
Dre Erwin
Member

is there a short code for new posts and members, and whos online

 

Id like to add them to my wordpress widgets

18 Answers

New Answer

KV kvr28
kvr28
Member

take a look at the template tags plugin

https://simple-press.com/documentation/codex/plugins/our-plugins/the-template-tags-plugin/

DE Dre Erwin
Dre Erwin
Member

awesome…how do u set this as current user?

[sp_forum_rank userid='2']

YS Yellow Swordfish
Yellow Swordfish
Member

Will need a lot more information on what you are trying to do and what that question means I am afraid…?

DE Dre Erwin
Dre Erwin
Member

Persons name and rank…total posts

 

thanks it

IK Ike
Ike
Member

You should have all the information needed from the link KVR posted there.

See the template tags Author Posts which can display name a post count, and Forum Rank which as the name suggests displays forum rank.

Further down the pages you should find ‘usage’ sections which detail how to add these functions.

Have a go, but shout if you need any further help.

DE Dre Erwin
Dre Erwin
Member

I dont want to show user #2 though..I want to show the signed in user…what would be the code…sorry!

MP Mr Papa
Mr Papa
Member

did you look at the links Ike gave you???  The forum rank template tags takes an argument that is the user you want to show…

DE Dre Erwin
Dre Erwin
Member

I did look at the links but what may be easy for u isnt for all of us lol

 

[sp_forum_rank userid=’2′] shows me a guest but not me when Im signed in…I want the signed in user to see thier rank…and picture of it

MP Mr Papa
Mr Papa
Member

something like

global $current_user;
sp_ShowForumRankTag($current_user->ID);

MP Mr Papa
Mr Papa
Member

a simple ‘No’ is not helpful… please tell us exactly what and where you did… and then what the results were… ie what was shown…. any errors, wrong info, etc.. need info to better help you…

DE Dre Erwin
Dre Erwin
Member

well when I put global $current_user;
sp_ShowForumRankTag($current_user->ID);

 

in the html box in the widget area,

this comes up on the website side bar:

global $current_user;
sp_ShowForumRankTag($current_user->ID);

MP Mr Papa
Mr Papa
Member

your widget for the sidebar area must be able to handle php… so try this

ID); ?>

if it doesnt work, you need widgets with php support… I could give you a shortcode, but you still need php ability to get the current user…