Tagged: activity feed, help, shortcode
- Brajesh Singh on March 23, 2018 at 4:58 am #14048
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() .'"]' );
echo do_shortcode( '[rev_slider alias="gym-classes-'. bp_get_displayed_user_username() .'"]' );
Hope that helps.
- Brajesh Singh on March 24, 2018 at 12:37 pm #14085
This should do the job
echo do_shortcode( '[rev_slider alias="' . bp_get_displayed_user_username() . '-story"]' );
I’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?
‘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.
- Brajesh Singh on March 24, 2018 at 8:20 pm #14091
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.