Tagged: single media light in box
I am trying to popup the lightbox dialog on my custom directory search page for a single media item.
I will try and explain what I have at the moment and hopefully you can tell me what I need to add and what I am missing.
I have a directory page on my site and I have overridden some php files using the duplicate folder structure in my child theme i.e mediapress/default/buddypress/directory – I have changed index.php in this folder to call a bespoke loop if the user enters a search criteria > loop-resources.php instead of loop-gallery.php.
Within my custom loop-resources.php I show all photos using the search criteria via the shortcode:
<?php echo do_shortcode(‘[mpp-list-media search_terms=”‘. $search_terms .'” column=6 per_page=30 type=”‘. $type .'”]’); ?>
If the way I am doing this is wrong then I am open to any other suggestions i.e calling my own query instead of the shortcode??
There are multiple ways to do it.
1. You can add lightbox=1 to the shortcode and it will do the rest automatically.
2. We have a full featured API for displaying lightbox. Please see it.
Hope that helps.
You must be logged in to reply to this topic.