Skip to:
Content
Pages
Categories
Search
Top
Bottom

How To Add Profile Link to an Elementor Widget


  • b1n
    Participant

    @fabioangeluci

    I had this problem without an easy solution, so I did one wich worked perfectly.
    To add the logged in user profile link to a Elementor Widget, do this:
    Add a custom shortcode to your theme functions.php

    // Custom Buddypress User Profile Link
    function custom_bp_user_link( $atts ){
    	return bp_loggedin_user_domain();;
    }
    add_shortcode( 'bp_user_link', 'custom_bp_user_link' );

    After this, go to Elementor and in the link option of your widget select “Custom URL”, then select “Shortcode” and add
    [bp_user_link]

  • You must be logged in to reply to this topic.
Skip to toolbar