• OK, so bare with me here as I try to explain this.

    I have used custom post types to create a essentially a database of images (designs – 1000’s of them) in WordPress. So now I want to create a feature similar to what on the backend where you add your featured image. The difference is that I want all of the images that show up in that lightbox pops up to be essentially a WP_Query that loops through all of the CPTs and displays the_title() and the_thumbnail() from each one.

    The end goal is to add this CPT selector (or picker) to a WooCommerce product page so people can add that CPT as custom field to a product (lets just say a tshirt in this case). Once they select the CPT, the pop window would close and they would be left with a thumbnail of the design and the_title() of the design (essentially a serial number) on the page. All of this info would then be sent to the cart and then sent submitted in the order.

    I know what you are thinking right now, hire someone to build this. lol. I know. I just want to get pointed in the right direction.

    How can I build essentially a replica of the image selector window built into wordpress that I can query the CPTs in instead of images from the media library?

Viewing 1 replies (of 1 total)
  • Hi there.

    Are you sure you want customers to click and choose from thousands of designs? the number of choices are overwhelming and may not be the best user experience, even with images and titles. this is often site owner’s job, not customers ??

    it is easier to display the custom post types in a gallery for customers to search, browse and choose. this is the approach that many ecommerce solutions take.

Viewing 1 replies (of 1 total)
  • The topic ‘I want to build a CPT picker’ is closed to new replies.