Tagged: gallery, mediapress
Hi @sbrajesh,
Great plugin..i like it.
Can u help me, how to show user avatar in list gallery like this
–> https://4.bp.blogspot.com/-NM2RYN1zBK0/WqiJ0Qm8HxI/AAAAAAAApsU/e4necKtdrGQqNmfAw3VjxaQ64XhH-1gmgCLcBGAs/s1600/user-galerry.jpgSorry, my english not very good. Hope u understand
Thanks.
Hello Artzam,
Thank you for posting. Try the following code in your ‘bp-custom.php’ file. Please let me know it is works or not
function buddydev_show_user_avatar() { $gallery = mpp_get_gallery(); $user_permalink = bp_core_get_user_domain( $gallery->user_id, true ); ?> <a href="<?php echo $user_permalink; ?>"> <?php echo bp_core_fetch_avatar( array( 'item_id' => $gallery->user_id, 'object' => 'user', 'type' => 'thumb', 'html' => true, 'width' => 30, ) ); ?> </a> <?php } add_action( 'mpp_before_gallery_title', 'buddydev_show_user_avatar' );
Thank you
RaviHi @artzam ,
Welcome to BuddyDev.The code @ravisharma shared is one way to do it, the other way will be to copy the gallery-loop.php in the child theme and modifying it.
Please let me know if you want to use the previous approach or need assistance with overriding in theme.
Thank you
BrajeshThanks @ravisharma for the code. Yeah! it work..
Thanks for the feedback @sbrajesh sorry but where i could found gallery-loop.php. I only found ‘class-mpp-admin-edit-gallery-panel.php’ and ‘class-mpp-admin-gallery-list-helper.php’..
TQ
ArtzamHi Artzam,
Glad that @ravisharma ‘s code worked.For template based modification, you can get it from plugins/mediapress/templates/default/gallery/loop-gallery.php and copy to
Yourtheme/mediapress/default/gallery/loop-gallery.php
Regards
Brajesh
You must be logged in to reply to this topic.