• i try to build author archive page but some shortcode need value from the_author_meta(‘id’) but i do not know how to insert it. Can you help me?

    Ex.$user_id=get_the_author_meta(‘ID’)
    [some_shortcode user=”$user_id”]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    If you’re doing this in code, that would be

    echo do_shortcode('[some_shortcode user=”' . $user_id. '”]');

    Or is your question “Can I pass a user id to a random shortcode?”

    Where is this shortcode coming from?

    Thread Starter mammono

    (@mammono)

    it just Example. Real shortcode is [videowhisper_content_list author_id=””]
    I have tried following your advice. but it returns only the author’s id number.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You should contact the developers of that shortcode.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to insert get_the_author_meta(‘ID’) in shortcode’ is closed to new replies.