Archived

This topic is now archived and is closed to further replies.

  • 0

Viewer Viewer plugin not working ok with [gallery] in template

Question

Posted · Report post

I recently purchased the viewer plugin and it is really looking great. But I have problems to get working properly inside a template.

I use this now html/php inside my template:

<div class="tab-pane" id="tab2">

<?php echo do_shortcode('[gallery]'); ?>

</div>

All attached images are showed but it looks like the viewer plugin is not loaded.

You van see it here:

http://apsupport.nl/objecten/ruiterweg-29-castricum/

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.

1 person likes this

Share this post


Link to post
Share on other sites

13 answers to this question

Posted · Report post

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.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi!

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.

 

http://screencast.com/t/tg04y1jc

 

You also have an undefined index from your maintenance plugin.

1 person likes this

Share this post


Link to post
Share on other sites

Posted · Report post

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.

Share this post


Link to post
Share on other sites

Posted · Report post

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.

Share this post


Link to post
Share on other sites

Posted · Report post

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.

Share this post


Link to post
Share on other sites

Posted · Report post

Hmmm.. I still don't get it.

All images shown in this gallery are attachements from this specific post.  Here is another example:

http://apsupport.nl/objecten/den-burglaan-18-limmen/

 

And as you can see in the html-source from this page are all images inside <div class="viewer-wrapper"> 

Share this post


Link to post
Share on other sites

Posted · Report post

Added the post ID, but this doesn't change anything

 

<?php echo do_shortcode('[gallery id="'.$post->ID.'"]'); ?>

Share this post


Link to post
Share on other sites

Posted · Report post

Viewer is only going to work on the pages that the gallery is used on.

Share this post


Link to post
Share on other sites

Posted · Report post

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.

Share this post


Link to post
Share on other sites

Posted · Report post

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.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi, 

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.

Share this post


Link to post
Share on other sites

Posted · Report post

...... would have been better to let the user decide to include it or not (through an option in the dashboard).

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks for the feedback.

Share this post


Link to post
Share on other sites
This topic is now closed to further replies.