Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Karma-How to add multiple images in a popup to a single thumbnail WordPress

I'm looking for a solution to show multiple images from a single pop-up thumbnail in Wordpress. i use a theme is called Karma. You can have a look in http://themeforest.net/item/karma-clean-and-modern-wordpress-theme/168737

I mean, i do a lot of photos and some videos in same session and after I want to be able to show them to my clients in my portfolio but using just a single tumbnail representative of the rest (like a facebook photo folder).

Best regards,

Raph G.

Answers (3)

2011-07-18

Romel Apuya answers:

Hi,

how about using this plugin.

http://winkpress.com/newsletter/subscribe/popup/simple-popup/

Firts you create a page where you pull two images side by side.

then use this plugin by calling it inside the loop where you display your thumbnail images.

this is just my idea, Havent tried it though.

regards,

romel


dadael comments:

Hi Romel,

thank you for the answer, but it's not what i look for.

Regards

2011-07-19

Paul Lumsdaine answers:

I found a good solution using lightbox:

[[LINK href="http://mysitemyway.com/support/topic/can-you-put-all-images-attached-to-a-post-all-in-one-lightbox"]]This might be what you're looking for[[/LINK]]

<strong>Synopsis of that link w/example:</strong>
Basic concept is to put all the images in there, then edit the html adding style="display: none" to all the images (or the anchor tag just to be sure). It will not show those and will only show the one without the style applied.

I know many lightbox / fancybox / whatever plugins give you the option of scrolling through all images on a page...

I have posted an example of this here, where I am using the WP Fancybox plugin:

[[LINK href="http://labcoatmedia.com/testing-one-thumbnail-with-multiple-images-displayed-for-wp-questions"]]Testing one thumbnail with multiple images displayed[[/LINK]]


dadael comments:

Hi Paul,

I try to use it, but it doesn`t work with my plugin. I'm using Karma theme, i don't know which plugin uses to show lightbox. In the shortcodes I use in post it's as appear:

i.e; [lightbox style="modern" image_path="http://dadaelprod.com/wp-content/uploads/2011/07/0005440541.jpg" popup="http://dadaelprod.com/wp-content/uploads/2011/07/0005440541.jpg" link_to_page="" target="" description="" size="two_col_large"]

I've to use the style="display: none" idea, but doesn't work. What do you think?

2011-07-19

Teri Westerby answers:

If you are using the NextGen gallery for your images, you can download an additional plugin called NextGEN Custom Fields. I'm not sure if you are familiar with editing PHP but, you can edit the PHP a bit and link individual images inside a gallery to anywhere, including more galleries.


1. Install Next Gen Gallery Plugin.
2. Upload images.
3. Go to Gallery > Options > Effects > Set Javascript Thumbnail Effect to ‘None’.
4. Now install NextGEN Custom Fields Plugin.
5. Go To Main menu ‘NGG Custom Fields’ > Setup Fields.
6. Click on ‘Image Custom Fields’ to create custom fields for image.
7. Add custom field by giving display name and selecting input type as text input(I want text box as input for link, So i select text input as type).
8. Go to Manage gallery and click on one gallery,You will find this added custom field for every image.
9. Now enter value of that text box for every image and click on save changes.
10. Go to Plugins > Editor > Switch to NextGEN Gallery in the Drop down Box > and click on nextgen-gallery/view/gallery.php It is near the bottom of the lists(Take backup before modifying this file.).
11. Replace following code starting from line number 41



<div >
<a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >
<?php if ( !$image->hidden ) { ?>
<img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> />
<?php } ?>
</a>
</div>

12. With this one

<div class="ngg-gallery-thumbnail" ><a href="<?php echo $image->ngg_custom_fields["img_url"]; ?>" title="<?php echo $image->description ?>"


<?php echo $image->thumbcode ?> >

<img title="<?php echo $image->alttext ?>"

alt="<?php echo $image->alttext ?>" src="<?php echo $image->

thumbnailURL ?>"

<?php echo $image->size ?> /></a>


</div>

13. Dont forget to change custom field name you have created. In my case My custom field which i have created is ‘img_url‘ So just replace your custom field name with your custom field name.
14. We have changed core file of plugin so whenever we upgrade this plugin, these changes will be lost.


it may not be exactly what you are asking but could be an alternate solution. a good example of this feature can be seen on one of my sites www.frankhoggard.ca

Hope that helps!


dadael comments:

Hi Teri,

thank you for taking your time replying me. I've tried every step, but it doesn't work as I'm looking for.

I use Karma theme (http://themeforest.net/item/karma-clean-and-modern-wordpress-theme/168737) and when I use a lightbox in a post, it's written as:

[lightbox style="modern" image_path="http://dadaelprod.com/wp-content/uploads/2011/07/0005440541.jpg" popup="http://dadaelprod.com/wp-content/uploads/2011/07/0005440541.jpg" link_to_page="" target="" description="" size="two_col_large"]

Any idea what can i do?

Thank you again!


Teri Westerby comments:

Off the top of my head you may be able to add all the images you want and for the thumbnails you don't want to show, add "display:none;" eg:




[lightbox style="display:none;" image_path="http://dadaelprod.com/wp-content/uploads/2011/07/0005440541.jpg" popup="http://dadaelprod.com/wp-content/uploads/2011/07/0005440541.jpg" link_to_page="" target="" description="" size="two_col_large"]

For this example I removed style=modern as I'm not sure what that applies too. If it doesn't allow you to add css within the tag I would suggest creating an additional class called display and set it to none and add it as such:




[lightbox style="modern" class="display" image_path="http://dadaelprod.com/wp-content/uploads/2011/07/0005440541.jpg" popup="http://dadaelprod.com/wp-content/uploads/2011/07/0005440541.jpg" link_to_page="" target="" description="" size="two_col_large"]

However this may not work as it may apply to both the thumb and the POP up but not a hard one to try