Tagged: activity feed, help, shortcode
Hi Peter,
You will need to somehow co-relate a slider to the user.The possible options are using the username or the id.
So, you will be naming your slider as
some-slider-1 or some-slider-admin
and based on the choice you can use the following to generate the slider name dynamically.
echo do_shortcode( '[rev_slider alias="gym-classes-'. bp_displayed_user_id() .'"]' );
or
echo do_shortcode( '[rev_slider alias="gym-classes-'. bp_get_displayed_user_username() .'"]' );
Hope that helps.
Hi Peter,
This should do the jobecho do_shortcode( '[rev_slider alias="' . bp_get_displayed_user_username() . '-story"]' );
Regards
BrajeshI’m sorry Brajesh, that doesn’t make any sense. The syntax is confusing to me.
If I used a revolution slider with the name “revslider-story”, with the username ‘peterfae’ how exactly would that syntax play out?
like this?
‘echo do_shortcode( ‘[rev_slider alias=”‘rev slider-story . bp_get_displayed_user_username(peterfae) . ‘-“]’ );’
I … that doesn’t feel right. Where do I put the single ticks or the double ticks? Do I put the username inside the parentheses? Confused.
Hi Peter,
I am not sure how you want it now and it will help if you can write exactly the way you want the shortcode.The earlier was to make it like ‘user-name-story’ e.g. peterfae-story.
You must be logged in to reply to this topic.