BuddyDev

Search

Lightbox revisited

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #13066

    https://buddydev.com/support/forums/topic/getting-mediapress-to-open-all-images-in-colorboxlightbox/

    I wanted to add a further question, how can I get it so that when a single image is shown (clicked from recent media widget). It goes to a page with the single image. How can I get that one to open in the my custom lightbox?

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #13071

    Hi Audiomonk,

    Since you are not using out lightbox and using a custom one, We will need some time to help you with. I will ask @ravisharma to look at this and assist you.

    Thank you
    Brajesh

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #13085

    Thank you very much, I might have a go myself if I knew which file displayed this.

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #13130

    Hello Audiomonk,

    I am on it. please let me know are you using any WordPress plugin for custom lightbox Or you have some custom code for it.

    Regards
    Ravi

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #13133

    Hi,

    Great news!

    https://buddydev.com/support/forums/topic/getting-mediapress-to-open-all-images-in-colorboxlightbox/

    In that thread, the code is there for using the lightbox for the gallery views. It’s a plugin called Huge It lightbox. Hope that helps.

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #13134
    This reply has been marked as private.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #13138

    Hello AudioMonk,

    Thank you for the acknowledgement. You can achieve this by overloading the widget template with name ‘grid-photo.php’. Just follow the following steps.

    1. Copy Template ‘mediapress/templates/mediapress/default/widgets/grid-photo.php’.
    and paste it to active theme directory like ‘wp-content/themes/twentysixteen/mediapress/default/widgets/grid-photo.php’

    2. Replace the following content

    
    	<a href="<?php mpp_media_permalink(); ?>" <?php mpp_media_html_attributes( array(
    							'class'            => 'mpp-item-thumbnail mpp-media-thumbnail mpp-photo-thumbnail',
    							'data-mpp-context' => 'widget',
    						) ); ?>>
    							<img src="<?php mpp_media_src( 'thumbnail' ); ?>" alt="<?php echo esc_attr( mpp_get_media_title() ); ?> "/>
    						</a>
    

    with

    
    	<a href="<?php mpp_media_src(); ?>" <?php mpp_media_html_attributes( array(
    							'class'            => 'mpp-item-thumbnail mpp-media-thumbnail mpp-photo-thumbnail responsive_lightbox',
    							'data-mpp-context' => 'widget',
    						) ); ?>>
    							<img src="<?php mpp_media_src( 'thumbnail' ); ?>" alt="<?php echo esc_attr( mpp_get_media_title() ); ?> "/>
    						</a>
    
    

    Please let me know if it works or not.

    Regards
    Ravi

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #13139

    Fantastic, thank you.

    I did want it to go to the media page first, then to lightbox the image there, but I think I know what to change. Which php file do I edit for the media page?

    Thanks again.. 🙂

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #13143

    Hello Audiomonk,

    Good to know. Marking this topic as resolved.

    Regards
    Ravi

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #13177

    It is, but could you answer my other question?

You must be logged in to reply to this topic.

This topic is: not resolved