Replies
Also I have tried creating a query
if ( $the_query->have_media() ) : <?php while ( $the_query->have_media() ) : $the_query->the_media(); ?> ..etc
$args= array($user_login);
For example but I am not confident that I could create a query that completely excludes unwanted users media … for example if I query by id (4) it would probably show also for user (14) and (40) I think. And by name the same problem appearHi Ravi,
I have tried this shortcode but it displays just the thumbnail image of the gallery right?
I would like to display all the images directly of one defined gallery. It works with the gallery Id but that one is hard to set as variable since galleries are generated automatically in my site.Thank you again for great plugin and support!
Hi Brajesh
Thank you very much.
So with the shortcode it works good, i have used this code in my profile page template.
echo do_shortcode( '[mpp-list-gallery component=members user_id="1" show_creator=1 before_creator="By: " ]' ); echo do_shortcode( '[mpp-uploader]');
With the second method I have used it like this :
// the query $the_gallery_query = new MPP_Gallery_Query( array( 'user_id' => 1 )); ?> <?php //if ( $the_gallery_query->have_galleries() ) : ?> <!-- the loop --> <?php while ( $the_gallery_query->have_galleries() ) : $the_gallery_query->the_gallery(); ?> <h2><?php mpp_get_gallery_title(); ?></h2> <?php endwhile; ?> <!-- end of the loop --> <?php mpp_reset_gallery_data(); ?> <?php else : ?> <p><?php _e( 'Sorry, no gallery found.' ); ?></p> <?php endif; ?>
In this second case, the else statement works when the query is left empty but does not display anything when I put the user (for now I am testing and user 1 has one gallery).
Now with the shortcode method I am missing the option to create a gallery (after I will implement a conditional that that options only appears if user is logged in).
Any ways to add that last part? I would like to have the full options possibilities that appear when opening the tab in the user profile navigation, but without displaying the user profile navigation.Thanks again.