BuddyDev

Search

[Resolved] Add Name under Media Gallery

  • Participant
    Level: Initiated
    Posts: 10
    Xochi on #6739

    Greetings,
    I followed the instructions from a much older post on this and put code into the the functions.php file and there was no change. What I would like is the user name of the member who owns a gallery or media to appear und the thumbnail. I am creating pages that gather galleries across members, so I want visitors to see who the media belongs to. These pages are created with shortcode.
    This is the code I added

    add_action( ‘mpp_after_media_widget_item’, ‘mpp_custom_add_user_link’ );
    function mpp_custom_add_user_link() {
    //you may put some conditions here like

    //mpp_is_single_gallery();
    //mpp_is_single_media();
    //to avoid showing it on single gallery/media pages

    $user_link = bp_core_get_userlink( mpp_get_media_creator_id() );
    echo $user_link;
    }
    add_action( ‘mpp_after_media_shortcode_item’, ‘mpp_custom_add_user_link’ );

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #9959

    Sorry for updating this post today(after 7 months).

    In MediaPress 1.1.5, we have provided options to show the gallery/media creator in shortcode lists

    Please see
    https://buddydev.com/mediapress/topics/getting-started/shortcodes/mediapress-gallery-listing-shortcodes/#gallery-creator-parameters

    https://buddydev.com/mediapress/topics/getting-started/shortcodes/mpp-list-media/#media-creator-parameters

    Thank you.
    Brajesh

The topic ‘ [Resolved] Add Name under Media Gallery’ is closed to new replies.

This topic is: resolved