• ed

    (@wesleysoccer)


    I’m using this within my wp text widget and it does not work:

    <a href="https://isec.solutions/members/[s2Get constant="S2MEMBER_CURRENT_USER_LOGIN" /]/profile/">My Account</a>

    Trying to link to buddypress profile page…no luck.

    any help would be amazing.

    https://www.ads-software.com/plugins/s2member/

Viewing 1 replies (of 1 total)
  • replace the double quotes in the href surrounding the shortcode with single quotes like this

    href="[shortcode var="foo"]" = bad

    href='[shortcode var="foo"]' = good

    so your code would end up like this

    <a href='https://isec.solutions/members/[s2Get constant="S2MEMBER_CURRENT_USER_LOGIN" /]/profile/'>My Account</a>

    this is due to changes in wordpress 4.2.3 shortcode api, see this post for more details

    Changes to the Shortcode API

    also note that you will need to enable shortcodes in widgets if you have not already done so, put this code in functions.php to enable shortcodes in widgets

    add_filter('widget_text', 'do_shortcode');

    sam

Viewing 1 replies (of 1 total)
  • The topic ‘Url To Buddypress Profile’ is closed to new replies.