I want to build a CPT picker
-
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?
- The topic ‘I want to build a CPT picker’ is closed to new replies.