Viewer plugin not working ok with [gallery] in template
Posted 17 January 2013 - 04:57 PM
I use this now html/php inside my template:
<div class="tab-pane" id="tab2">
<?php echo do_shortcode('[gallery]'); ?>
All attached images are showed but it looks like the viewer plugin is not loaded.
You van see it here:
In first tab "Omschrijving" is it working ok; In this I have included [gallery] in the post editor.
In the 2nd tab "Foto's" is it not working and this one is included in the template.
Posted 17 January 2013 - 05:26 PM
Seems to be working ok for me? Also, it's only going to load on the page it's used on. So because Tabber pulls in content with the_content, Viewer thinks it's not being used there.
You also have an undefined index from your maintenance plugin.
Posted 17 January 2013 - 05:49 PM
I have included it twice:
1) In the tab "Omschrijving". This is the post-content and I have added the shortcode [gallery] manually to the post content. This is working ok.
2) The shortcode [gallery] in the 2nd tab "Foto's" is included in the template with the code <?php echo do_shortcode('[gallery]'); ?> and in this tab it is not working ok
btw: I do not use the Tabber section on this site.
Posted 17 January 2013 - 06:14 PM
Right on, looked like it sorry. But yeah Viewer is only going to work on the pages that actually have a gallery, otherwise your [gallery] shortcode has no idea what gallery to load. So in other words, it's only going to work on pages that have [gallery], as it loads the attachments from that specific page/post.
Posted 17 January 2013 - 06:44 PM
Hmmm.. I still don't get it.
All images shown in this gallery are attachements from this specific post. Here is another example:
And as you can see in the html-source from this page are all images inside <div class="viewer-wrapper">
Posted 17 January 2013 - 07:06 PM
Added the post ID, but this doesn't change anything
<?php echo do_shortcode('[gallery id="'.$post->ID.'"]'); ?>
Posted 17 January 2013 - 07:45 PM
Viewer is only going to work on the pages that the gallery is used on.
Posted 17 January 2013 - 08:10 PM
Is there another way to add a gallery to a specific page? But not manually in the post editor, because my posts are automatically generated.
Posted 18 January 2013 - 11:49 AM
Sorry to bother you again, Nick.
But why is the featured image not shown in the Viewer gallery? With the plugin is disabled, the featured image is shown in the gallery.
Posted 18 January 2013 - 03:02 PM
It's designed to excluded the featured image, as most folks will have a certain cropped size, and that size is too small to be displayed in the plugin.
Posted 18 January 2013 - 03:28 PM
...... would have been better to let the user decide to include it or not (through an option in the dashboard).
Posted 19 January 2013 - 07:34 AM
I'm a huge fan of your products Nick, but I think you should change this is the Viewer plugin.
There is no way to get the image included in the Viewer gallery. Even when the image ID is specified in the IDs option, is it not shown, In my opinion is that not correct.
Posted 20 January 2013 - 12:11 AM Best Answer
You are the only person out of hundreds that have asked for this. If the majority of users start asking for features, that's when things get added. I can't accommodate everyone's requests.