Skip Navigation

[Resolved] Creating a slider with a custom fields

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 8 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)


This topic contains 1 reply, has 2 voices.

Last updated by Beda 8 years, 2 months ago.

Assisted by: Beda.

Screen Shot 2016-01-26 at 20.12.51.png
Screen Shot 2016-01-26 at 20.12.40.png

Im trying to create a slider for images used within a post.
I have a custom post type called 'packages' and a custom field for images within this post type.
After adding images I've created a 'view' to display the results as a slider inside the post in which the images relate.

The problem i have is that the view is displaying all the images in my custom post type within the post and not just the ones associated with that post.

Its also not separating the images into separate slides but displaying 1 slide with all attached images per post, then sliding to the next posts images.

There must be a way of filtering the images to only show ones assigned to the current post being viewed, however the query filter option only allows selection by 'post id' and i have to input that as a number, but this means i cannot use it within a layout and automatically change the id using a wpb-post-id shortcake as it doesn't allow shortcodes

The Views Query filter by Post ID : ShortCode attribute.png
Insert the View in a Post, set the IDs.png

I hope your Image Field is not a repeatable Field.

Because if so, you will need a Custom Code solution, that we do not provide as such, since it's not the purpose of Repeatable Image fields to create Sliders with.

But there are some customized solutions for this, using FlexSlider:

The part of returning only the Fields of the Post where this View is used on, is in both cases the same and relatively simple.

You can as example set the View to Query Posts with ID set by the ShortCode attribute "ids"
Then you insert the View in your Post, and in the View ShortCode, you pass the Post Id with our [wpv-post-id] ShortCode.

I added a ScreenShot and below is the example View integration Code on how to use that.

[wpv-view name="your-view" ids="[wpv-post-id]"]

That Post, where the View is used on, will now display only the currently viewed Post in the View, and subsequently, if you call Post fields, only those fields.

Please do not hesitate to open a new thread if other issues or problems arise

Thank you for your patience.

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.