Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: print of echo bp_displayed_user_id in a shortcode

@shanebp

Moderator

You don’t explain the context of usage – iow. where are you trying to show it.

bp_displayed_user_id() only works in the context of profile pages.
So if your shortcode is called in that context, you don’t need to set author parameter.
So you would call bp_displayed_user_id() in the function, not in the call.

Or you could try using dot notation, something like:

echo do_shortcode ( '[job-type author="'. bp_displayed_user_id() .'"]' );

Skip to toolbar