Skip Navigation

[Resolved] jQuery carousel documented in support forum not working

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to create a slider using flexslider for their repeatable field images.

Solution:

This can be done by taking a look at the ticket in the link below.
https://toolset.com/forums/topic/generate-slide-on-my-slider/

This support ticket is created 5 years, 5 months 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 13 replies, has 2 voices.

Last updated by davidm-13 5 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#1295189
carousel.JPG

I am trying to:
follow a thread on the forum that gives a solution for a jQuery carousel
https://toolset.com/forums/topic/photothumbnails-slider-gallery-for-my-custom-post-type/

Link to a page where the issue can be seen:
hidden link
I expected to see:
A carousel of images.
I copied the js from the thread into the js editor of my content template, and the following CSS that I managed to decipher from CT.png
[CODE]
.flex-container a:hover,
.flexslider a:hover
{outline: none;}
.slides, .slides > li,
.flex-control-nav, .flex-direction-nav
{margin: 0;
padding: 0;
list-style: none;}
.flex-pauseplay span {
text-transform: capitalize;}
[/CODE]
and this is the html I used in the content template
[CODE]
<!-- Slider - start here -->
<div id="flexslider" class="flexslider">
<ul class="slides">
<!--

  • [types field="fotkes" separator="
  • " width="770" height="510" alt="[wpv-post-title]"][/types]
  • -->

  • [wpv-post-taxonomy type='plant-image' format='name' separator='
  • ' width='770' height='510' alt='[wpv-post-title]']
  • </div>
    <div id="carousel" class="flexslider">
    <ul class="slides">
    <!--

  • [types field="fotkes" separator="
  • " width="120" height="80" alt="[wpv-post-title]"][/types]
  • -->

  • [wpv-post-taxonomy type='plant-image' format='name' separator='
  • ' width='120' height='80' alt='[wpv-post-title]']
  • </div>
    <!-- Slider - end here -->
    [/CODE]
    Instead, I got:
    See screenshot

    #1295207
    #1295209

    Shane
    Supporter

    Languages: English (English )

    Timezone: America/Jamaica (GMT-05:00)

    Hi David,

    Please try the solution here.
    https://toolset.com/forums/topic/generate-slide-on-my-slider/

    Thanks,
    Shane

    #1295327

    Hi Shane,
    Thanks for this, I've installed the flexslider plugin, but I'm not sure how to adapt this code

    <div class="flexslider">
      <ul class="slides">
       [wpv-for-each field="wpcf-image_1"]
      <li>[types field="image_1" size="medium" align="none" resize="pad" padding_color="#FFF"][/types]</li>
      [/wpv-for-each]
      </ul>
    </div>
    

    The image names for the flexslider are stored in a taxonomy field, slug name: "plant-image".
    Thanks for your help
    David

    #1295339
    carousel-missing.JPG

    Hi Shane,
    Tried this:

    <!-- start flexslider -->
    <div class="flexslider">
      <ul class="slides">
       [wpv-for-each field="wpcf-plant-image"]
      <li>[wpv-post-taxonomy type='plant-image' size="medium" align="none" resize="pad" padding_color="#FFF"][/wpv-post-taxonomy]</li>
      [/wpv-for-each]
      </ul>
    </div>
    <!-- end flexslider --> 
    

    but all I get is a white line where images should be - see screenshot

    #1296165
    carousel2.JPG

    Hi Shane, Still struggling with this - really appreciate your help.
    I changed the taxonomy field to a custom field single-line - slug: plant-image
    the field contains a comma separated list of images. Is this correct?
    Do I need to store the images names in a different format.
    I've attached a screenshot of what I get - instead of the images.
    Included the html and js, per your instructions.
    Any help greatly appreciated - have a dead-line hanging over me!

    Thanks
    David

    #1296261

    Shane
    Supporter

    Languages: English (English )

    Timezone: America/Jamaica (GMT-05:00)

    Hi David,

    Actually no this is incorrect.

    The field you created is a single line field for the images. This won't work because the images are not uploaded.

    What you need to do is to create an image custom field and set this custom field so that it can have multiple instances so that you can upload more than one image.

    From there we can work on the tutorial here
    https://toolset.com/forums/topic/generate-slide-on-my-slider/

    Thanks,
    Shane

    #1296353

    Hi Shane, Thanks for your support, before I start on this I just want to be clear where these images are. I've uploaded all images to the wordpress media library and the image name identifies the post it belongs to. Is this correct?
    You say I need to create an image custom field, does this field contain the image or the image name? If it's the image how do I upload the image to the custom field?
    Thanks for your help
    David

    #1296413

    Shane
    Supporter

    Languages: English (English )

    Timezone: America/Jamaica (GMT-05:00)

    Hi David,

    I've uploaded all images to the wordpress media library and the image name identifies the post it belongs to. Is this correct?

    When you create the image upload fields on the posts, you can go to the post and add the image to that post. Since you say you have already added the image to the media library all you need to do now is to attach that image to the post.

    does this field contain the image or the image name? If it's the image how do I upload the image to the custom field?

    It contains the image file. The image field is an upload field where you can click the upload button to add the image to that field.

    Thanks,
    Shane

    #1296441

    Hi Shane,
    I've created all posts by importing them from a csv file. I included the image names in the image custom field column of the csv file. I now understand that this was a mistake and I should have uploaded/attached the images separately, after creating the posts.
    I have hundreds of posts and images, is there a way I can now attach them automatically? If not how do I automatically attach the images to the post when I upload them?
    Thanks for your help, sorry for my ignorance.
    David

    #1296519

    Shane
    Supporter

    Languages: English (English )

    Timezone: America/Jamaica (GMT-05:00)

    Hi David,

    I would actually recommend manually uploading them one by one. The reason is because if the post has multiple images, in the same field then the images are stored in a particular way.

    So they would need to be added manually.

    Thanks,
    Shane

    #1296737

    Hi Shane,
    I'm finally getting the picture - pun intended.
    As you say I can't load multiple pictures using csv import, but I can load all first images for a post if I specify the media library URL, so that takes care of 50% of the images.
    The rest I could load manually, but I'd really appreciate any suggestions you might have for loading a string of URLs, so that each URL appears as a separate image field - preferably using a free plugin.
    Thanks for you help
    David

    #1296863

    Hi Shane,
    Just wanted to let you know that there's a very simple solution using csv importer:
    https://toolset.com/forums/topic/import-csv-into-custom-fields-with-repeater-type/

    Seems strange that the forums are full of "csv importer cannot handle repeater fields"

    and the above thread gives a solution by adding 3 lines of code that even I understand.

    I think that this solution is very important for Toolset - instead of telling people there is no solution,
    and having alot of frustrated customers, why is this solution not put forward, please let your development team know there is a solution put forward by Agnes.
    Thanks for all you help
    David

    #1298039

    Shane
    Supporter

    Languages: English (English )

    Timezone: America/Jamaica (GMT-05:00)

    Hi David,

    The solution here is not an official solution from our development team and in our documentation.

    You may find custom solution on the forum, however with these solutions they are not supported by our supporters so if you run into any issues using these code then we won't be able to provide a solution since its not one of our official solutions.

    Thanks,
    Shane

    #1298051

    My issue is resolved now. Thank you!