0

I am creating some sliders type functionality for my wordpress theme and I thought that creating two seperate db tables like 'sliders' and 'slider_images' is a good idea.

My problem is that i don't know what is the best way to handle the creation of those tables. If it was a plugin, I would just do it on activation, but it is just some functionality as part of my theme and i haven't really found a hook that is executed once when the theme is activated.

If possible, i would like to not have to check the database for the existence of tables in every page refresh and create if not. Is there a way to do that ?

4

Don't use separate database tables in a Theme, especially for creating custom content types. Use WordPress-core Custom Post Types.

  • oh, I see thanx ! – SpyrosP Aug 25 '12 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.