1

I'm building a Wordpress Plugin and it has two tables and some data. Right now, for displaying and changing the data, I'm using the wpdb function and manually creating the user interface (mimicking the Default one).

However, I see that other plugins have a more consistent style with their tables and the same features (like the bulk button). I'm getting suspicious about Wordpress Taxonomies. I read, but so far, taxonomies seems to be related to posts in a way or the other.

My data doesn't relate to posts, it's completely independent. Can I still use Wordpress Taxonomies? Can the taxonomy help me build a consistent interface?

19
  • If the data has nothing to do with posts then why would you want to use taxonomies? Taxonomies are used to create relationships between posts(or custom types), ie. groupings of posts that fall under specific terms. Personally i don't think WP Taxonomies will be much use to you here.
    – t31os
    Commented Dec 27, 2010 at 12:27
  • .. if you're displaying custom data it makes sense you'd need to handle the result filtering yourself using functions that imitate the WP filters.
    – t31os
    Commented Dec 27, 2010 at 12:34
  • @Omar Abid - Can you explain your use-case. It's very hard for us to help you in abstract. Also, I think the title of your question does not accurately reflect your actual question. Can you consider re-titling your question? Commented Dec 27, 2010 at 14:18
  • 1
    @t31os - You know taxonomy can be used for anything including non-posts. That's why wp_term_relationships has an object_id field instead of a post_id field. Think users, comments, meta, even taxonomy terms themselves. So yes I think someone could use a taxonomy for their own custom tables. OTOH, I'm suspicious whenever someone creates a new table. From what I've seen 9 times out of 10 time they could have used a built-in table with less hassle. Commented Dec 27, 2010 at 14:21
  • @Mike, I think we are getting close. I just wanted to know if I give Wordpress the structure of my data (through taxonomy or anything else) can it produce the table automagically?
    – Omar Abid
    Commented Dec 27, 2010 at 15:17

1 Answer 1

5

check this out, I believe this might be what you're looking for. it helped me a lot.

2
  • Thank you for the link. That's actually what I have done. I'm just wandering if taxonomies can do it automatically for you.
    – Omar Abid
    Commented Dec 27, 2010 at 9:02
  • 1
    That's a great link, but i'd note one thing, there's no need to write any HTML for the admin icons, you can call them like this.. <?php screen_icon('themes') ?> (if you wanted the themes icon).
    – t31os
    Commented Dec 28, 2010 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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