Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 ?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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

share|improve this answer
    
oh, I see thanx ! –  SpyrosP Aug 25 '12 at 20:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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