Skip Navigation

[Resolved] How to let the image of the 「Allow multiple-instances of this field」 to Slider.

This support ticket is created 6 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 6 years, 1 month ago.

Assisted by: Nigel.

Author
Posts
#1147056
圖片 043.png

Hi Support,

I setting a custom field is product-pic. And it is 「Allow multiple-instances of this field」 .

And I setting Slider view is 「Breaking News Slider」.

The 「Templates for this View」 code is :

<div class="news-slider">
  <div class="news-slider-content">
    <h3><i class="glyphicon glyphicon-chevron-right"></i> [wpv-post-link]</h3>
    [wpv-post-excerpt length="30" count="word" more="... <a href='[wpv-post-url]'>瞭解更多</a>"]
  </div>
  [wpv-conditional if="( '[types field='product-pic' output='raw'][/types]' ne '' )"]
  	[types field='product-pic' title='%%TITLE%%' alt='%%ALT%%' size='full'][/types]
  [/wpv-conditional]
  
  [wpv-conditional if="( '[types field='product-pic' output='raw'][/types]' eq '' )"]
    無圖片
  [/wpv-conditional]
</div>

Then see my upload image.

How could I let it normal?

Thank you.

#1147106

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

Views has a built-in slider feature, but it is for transitioning between posts, not for fields of the same post.

For that you need to create your own solution.

I'm guessing from the details of your question that you already have a slider solution you are trying to work with (that is based upon a wrapper div with a class of news-slider).

I have described to clients previously how to set this up using the freely available flexslider library, which involves enqueueing the required files and then making sure that the html output generated by Views corresponds to the markup required by the slider library (and which involves using the wpv-for-each shortcode to output all of the images).

You can read a detailed description here: https://toolset.com/forums/topic/how-to-display-the-pics-i-uploaded-as-a-slider/#post-518295

You may be able to modify that for the requirements of a different slider library.

An alternative would be to add images (and possibly caption texts) as custom fields that are part of a repeatable field group, and you could then use the built-in Views slider feature to iterate over each field group repetition.

This page describes creating a slider using Views: https://toolset.com/documentation/user-guides/creating-sliders-with-types-and-views/

You would need to modify this a little inasmuch as the Content Selection would be the repeatable field group you created to store the image + caption, and then you would need a Query Filter to specify the post to which the repeatable field groups belong.

#1147721
圖片 048.png
圖片 047.png
圖片 046.png
圖片 045.png

Hi Nigel,

I follow the post to setting :

https://toolset.com/forums/topic/how-to-display-the-pics-i-uploaded-as-a-slider/#post-518295

Then it can not show the front-end lightbox. Could you help me to find the question? Thank you.

#1147869

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

The screenshot 046 shows "WordPress Lightbox free version".

Is this another plugin you are using?

It looks like it is interfering.

Can you disable the plugin and see if it then works as expected?