• I am creating my own carousel plugin which I will use on sites that I create for my clients. Yes there are many out there but mine does what I want it to do. I could use others but it is a personal goal to create a proper WordPress plugin. Anyway, so I have my own database table to store the images and information but I want to use the WordPress tables. Is there documentation out there how to accomplish this? What is the proper way to store and retrieve information form these tables?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    In general use class wpdb methods using the global $wpdb object. Depending on what sort of table data you need, there could be WP helper functions that would be simpler than using $wpdb.

    For image data, you could use the WP media library like we would for most other site images. Much data is saved by WP itself as an “attachment” post type when the image is uploaded. You can save any additional image data you need in the postmeta table. You could use get_post_meta() and its relatives to add, update, and delete.

    Thread Starter miowebdesigns

    (@miowebdesigns)

    Thank you for the information. I will give it a look.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using WP database tables for plugin’ is closed to new replies.