Support » Fixing WordPress » Slider using Custom Post Types with Custom field images

  • Resolved jhopson


    Hey! Well if you attempt to help me on this, thank you in advance. After spending literally 20 hours on this yesterday I have come to the end of my limited knowledge…I need help.

    Goal: To create individual custom posts that each have a slideshow with thumbnails that pull the images from custom fields inside the custom post. For better understanding view the test site

    Here is my problem. I am using a custom post type (Portfolio) and have created 10 custom fields for image inputs. I need to create a loop that starts at the field custom field and displays the ‘billboard’ image and its corresponding thumbnail. (By the way I have created the different image sizes in the functions file. ‘billboard’ and ‘thumb’) Since all 10 images are on the same custom post, I am unfamiliar with how to access each one, since I believe the_post_thumbnail() only applies to 1 image. I have attempted this through many different loops, assuming that a foreach would be my best solution, but to no avail. I will post my code in hopes that someone will be able to offer a solution.

    Remember we are dealing with a custom post type/ 10 custom field images/ and thumbnails linking to larger billboard images. Whew this has driven me crazy!

    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Update: I have managed to get the billboard to show the original ‘billboard’ slide image and all 10 custom field ‘thumbs’.

    It seems that the only problem I am continuing to have is when the slider goes to the next thumbnail, the ‘billboard’ sized image does not display.

    View the site again for better understanding.

    Question: The more I think about it, I wonder if I need to use the same loop to control both the slide and the thumbnail. Although the thumbnail then wouldn’t directly “link” to the larger billboard image. It would give the appearance since both would load and slide at the same time. Any thoughts?

    solved! I managed to work for three days on this issue and it finally clicked.

    Hi there jhopson,

    Care to share the code on this one? Hopefully you might spare some of us 3 days of sleepless nights! 😉


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Slider using Custom Post Types with Custom field images’ is closed to new replies.