Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Brajesh Singh

    (@sbrajesh)

    Hi,
    Thank you for asking.

    You can use the following code to display the gallery media count

    
    
    <?php echo mpp_gallery_get_media_count( $gallery_id );?>
    
    

    In the gallery loop(galleries list, shortcode, widgets etc), you can use the

    
    
    mpp_get_gallery_id()
    

    And on the single gallery page, you can use

    
    mpp_get_current_gallery_id()
    

    To get the current gallery id.

    Hope that helps.

    Regards
    Brajesh

    Thread Starter mahwash

    (@mahwash)

    Please where can i place the code?

    Thread Starter mahwash

    (@mahwash)

    I placed the code in theme fuction php and it crashed my site.

    Plugin Author Brajesh Singh

    (@sbrajesh)

    My sincere apologies.
    I forgot about that. It should never go to functions.php.

    It should go to gallery template.

    You may copy this file to your theme(Please keep it in yourtheme/mediapress/default/gallery/loop-gallery.php) and then put the code.

    
    <?php echo mpp_gallery_get_media_count( mpp_get_gallery_id() );?>
    

    In the loop.

    Hope that makes it work.

    Plugin Author Brajesh Singh

    (@sbrajesh)

    I hope you have it resolved. marking it resolved. Please feel free to reopen if you need any assistance.

    Thank you
    Brajesh

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show number of items in each gallery’ is closed to new replies.