Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display user’s media gallery on their profile page


  • sbanner26
    Participant

    @sbanner26

    I can’t figure out how to display the media gallery on the profile page that have been uploaded by that user only. I’ve tried the following shortcode:

    [rtmedia_gallery context=”profile” context_id=”<?php echo bp_displayed_user_id() ?>”]

    but only get a “Sorry !! There’s no media found for the request !!” message. It works if I specify a user id in the context-id parameter, but I need it to work for whichever user’s profile page I’m on.

    I also attempted to modify the template files but not having any luck. I have very limited php editing skills but could handle it if I knew specifically which files to edit and what code to use. A shortcode solution would be great though.

    This is a profile page I’m testing on – https://thesiteshark.com/village-elementor/business-directory/alyssard/

Viewing 4 replies - 1 through 4 (of 4 total)

  • emaralive
    Participant

    @emaralive

    I’m not sure how to reply to your post because, it looks as if there is information that is missing that would be relevant. That stated, if I were to do such, placing referenced rtMedia gallery shortcode (sans any layout, styling, etc.), I would override/overload the “profile-loop.php” template file and add:

    <?php echo do_shortcode('[rtmedia_gallery context="profile" context_id="' . bp_displayed_user_id() . '"]'); ?>

    If nothing else, maybe someone else will have a better solution.


    sbanner26
    Participant

    @sbanner26

    Thanks emaralive,

    I gave that a try but no change. What other info would help? I’m using WordPress 6.3.2 running Hello Elementor Child theme and have BuddyPress set to Legacy. I have Elementor v3.17.2 and Elementor Pro v3.17.0 installed and running. Does any of that help?


    emaralive
    Participant

    @emaralive

    @sbanner26 out of curiosity, if one scrolls down past the Business Information; what is that at the bottom with the heading of Media Gallery?


    sbanner26
    Participant

    @sbanner26

    @emaralive I didn’t notice that before… guess I didn’t scroll down far enough. So I guess RTmedia must be adding the media gallery by user by default. Thanks so much for pointing that out

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar