Support » Plugin: BP Profile Shortcodes Extra » Calling shortcodes using PHP

  • I’m looking to use [bpps_profile_private_message_link]. I can use <?php echo do_shortcode( '[bpps_profile_private_message_link]' ); ?> but this doesn’t allow me to ad the ID user_id=”” e.g. $myuser_id. Is it possible to call it as a function?

    Thanks so much for this great plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter outcold

    (@outcold)

    This echo do_shortcode( "[bpps_profile_private_message_link user_id=\"$myuser_id\"]" ); ?> works but would still like to know if it’s possible to call the shortcodes directly from within php.

    Thanks 🙂

    Hello,

    Would you happen to know if you can call this shortcode through HTML? I am trying to use a plugin called PublishPress: Multiple Authors that allows you to have an author bio and click on the associated links below it. I figured I’d ask you since the plugin author for this hasn’t been active on the forum for months. Here’s the code I tried:

    <a class="message" href="{{ do_shortcode('[bpps_profile_private_message_link]')|raw }}">
    <i href="{{ do_shortcode('[bpps_profile_private_message_link]')|raw }}" target="_blank"
    class="message-author" /><i class="ua-icon ua-icon-chat"> </i></a>

    Thank you!

    Mark

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Calling shortcodes using PHP’ is closed to new replies.