Avoid serialized whenever you can. It is slow to read and you cannot really search for it.
Use custom tables – more than one:
- One for the relationship between users, tags and images:
user_id
,tag_id
andimage_id
. - One for tag meta data, your attributes, if I understand that right:
tag_id
,meta_1
,meta_2
…
Now you can look up for each attachment ID if there is an entry for the user, and then look up the meta data from the meta table.
Related Posts:
- Use Tags to Query Associated Multiple Posts and Get The Average Of Custom Field Values
- Should I use custom post types or a custom database tables for plugin development?
- Where are wordpress custom types stored?
- Delete all posts of a custom post type—efficiently
- List all the tags from a custom post type
- tag.php doesn’t work with tags on a custom post type post?
- Custom Post Types, or completely custom?
- How can I include custom post types on a tag page?
- Taxonomy count per Post type
- Load custom posts with same tag as page
- post_tag taxonomy with custom post type
- Custom Post Type with Input fields to seperate table on database.
- Adding post tags to custom post types
- Right way of storing large number of custom post fields
- show tags of custom post type ONLY
- How to use custom database tables for custom post types?
- Tag list & tag index for custom post type
- Undefined property: stdClass::$labels in general-template.php post_type_archive_title()
- Find callback function for custom taxonomy metabox
- Custom Post Type or Custom Tables
- Get posts with tag all post types
- Custom post type or just use custom fields
- Search Custom Post Type with all meta attached?
- Show certain terms from custom taxonomy but exclude ‘parent’ terms?
- Custom post type tag archives don’t work for basic loop?
- Create Pages from Database
- Use Custom Database with Custom Post Type
- Custom Search | Wrong output & question
- Exclude Custom Post Type & Pages From Auto-Tag Function
- Adding An Author Tag To Posts Automatically
- How do I write this SQL statement for Posts written in last 24 hours?
- Save or update data when custom post published
- Custom post type Vs. data in own table
- How to search from specific post type with tags?
- Custom post type with tags
- Save custom post type in different table
- Tag.php not displaying posts with the tag
- Using posts and postmeta table to store custom Address Book Plugin data
- Registering tags taxonomy for a custom post type
- Query for custom posts with a specific tag slug
- Categories and Tags not working!
- Event Manager: Events Deleted are still in DB as published but hidden in admin
- Rewrite url post_tag for custom post type
- Changing an item in drop down after 5 latest posts per taxonomy
- Add tags to a “pending” post before publishing
- Populate custom post type/custom fields from an external database
- Limit Number of Custom Post Type Dashboard
- Automatically convert standard posts with custom fields to custom post types
- Custom Post Type tag taxonomy “Page Not Found”
- In WordPress do I create tables for my plugin or do I create custom post types for a Student and Classes Registration system?
- Do not output category and tag URLs
- CPT or Custom Table for Repository of Serial Numbers
- Custom post tag images not displaying with ACF
- How to enable the user to add value through the admin panel?
- Organizing The Custom Post Type with Taxonomies / Parent Posts
- Shared Custom post type between WP network sites
- How can I include custom post types on a tag page?
- Filter custom post type by tags
- Loop multiple taxonomy in custom post
- Default taxonomy ‘post_tag’ added to CPT managing by custom role : nothing in the metabox
- Custom Post Type – Admin Columns
- Generating List of Tags from Custom Post Type
- Taxonomy count per Post type
- Custom Post Types and Posts are mixed
- Archive.php is not displaying tags
- Pulling Content from Existing Database
- WordPress Custom Post Type and sort by Tags
- Displaying database table in backend of wordpress
- Custom Post Type Tags Showing Under Regular Post Tags
- custom post type for custom talbe
- Return all wordpress custom posts in specific multidimensional array
- Check in function on custom page
- Most efficient way of deleting post
- Problem with menu categories doubling up when updating database?
- Inserting into WP DB
- Save number of Facebook likes to database
- get tags from custom post type
- custom post type tags
- Query Custom Post Type by Tag
- Display by tag from different post types
- WordPress and Unity high scores table
- Tags and Taxonomy links not working for Custom Post Types
- Tag-post relationship problem
- Checking for published posts in a certain post type
- Post type cloud like tag cloud?
- Switched server & domain name, now custom post types won’t save
- WordPress 3.1 – Tag page not showing posts from custom post type
- Attaching multiple custom taxonomies to one CPT?
- custom post types containing a collection of items
- how insert how many post type in this function?
- WordPress Admin Page Slow. Customer Post Type is the slowest
- Why WordPress does not Use Separate Table for Post Types (When Registring)?
- Can WordPress show posts based on a button that the user clicked 2 pages back?
- Remote database access on another wordpress site’s custom post type
- What would be the optimal CPT / Taxonomy design for the following entities structure
- ACF – Tags not showing up in Custom Post Types
- Should I save user cookie consent in a custom post type or make a custom database table?
- Tag template for Custom Post Types
- Search for portfolio tags & mixing portfoliotags and post tags
- Optimizing storage of Post Meta Entries