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_idandimage_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?
- Delete all posts of a custom post type—efficiently
- Custom Post Types, or completely custom?
- How can I include custom post types on a tag page?
- Taxonomy count per Post type
- 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()
- Custom Post Type or Custom Tables
- Search Custom Post Type with all meta attached?
- Custom post type tag archives don’t work for basic loop?
- Create Pages from Database
- Custom Search | Wrong output & question
- Exclude Custom Post Type & Pages From Auto-Tag Function
- 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
- Registering tags taxonomy for a custom post type
- Is it possible to make tag archive page specific to Custom Post Type?
- Search doesn’t find tags or categories in custom post types
- Navigation menus not showing because of custom post type filter
- WordPress post count not showing for custom post type author
- Adding custom tables to WordPress
- Change Permalink Structure for Tag.php template
- WP All Import – Using Xpath to set a select value
- Can’t query tag and post_type at the same time
- search also in taxonomy, tags and custom fields
- Custom post type getting wrong categories and tags
- Add tag to a custom post type doesn’t change the total of custom post type in backend
- How to display “Category and Post_tag” component in a CPT Gutenberg edit screen?
- Add update or delete database records using custom post type
- Importing Data from a Non-WordPress database, into WP
- Organize WordPress site, so it can maintain with huge database
- Show data from one Custom Post Type in another Custom Post Type
- Best way to specify “article type” in URL
- Tag page only display 10 posts
- Creating tags via API
- How to display custom post type tags?
- Display posts with tag for custom post type only
- Running a song lyrics site on WordPress
- portfolio custom type tags support
- Need help deciding on a taxonomy
- Allow front end users to add data to a custom post type
- Get Posts by Category, Tag , and CPT Taxonomy
- Is it possible to have “two” sets of tags?
- Show all Tags in each post
- wp_get_canonical_url showing first url of the post for custom page
- Entity to store contact form entries?
- WordPress as a frontend website for iOS app [closed]
- Using custom post types WordPress network
- If tag exists, then echo once
- Import External XML
- Custom post type, taxonomy and admin bar
- display custom portfolio tags
- Advanced archive url structure (category, tag and date)
- Say I have a tech blog, how best would I store technical specs for a phone, if i use custom post types
- Why doesnt my tag page populate with this custom post type?
- when looping through custom post data not appearing
- get taxonomies from terms
- how to display posts content on the custom css popup by clicking on each title on the sidebar?
- custom post types, custom fields and normalization
- Tags being removed upon updates to related posts: ACF/Genesis/WP5.4.1
- CPT tags not showing when editing post
- How to add independent “Tags” to Custom Post Type?
- How to replicate data storage and querying using WordPress. Custom posts/fields or Custom db tables?
- How to store additional data that is related to core data
- Confused about where to store my data
- Automatically / dynamically populating tags in custom post type
- Changing an item in drop down after 5 latest posts per taxonomy
- Add tags to a “pending” post before publishing
- Limit Number of Custom Post Type Dashboard
- In WordPress do I create tables for my plugin or do I create custom post types for a Student and Classes Registration system?
- 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
- Loop multiple taxonomy in custom post
- Taxonomy count per Post type
- Custom Post Types and Posts are mixed
- 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
- get tags from custom post type
- Query Custom Post Type by Tag
- Display by tag from different post types
- Tag-post relationship problem
- Checking for published posts in a certain post type
- 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
- Why WordPress does not Use Separate Table for Post Types (When Registring)?
- Remote database access on another wordpress site’s custom post type
- 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?
- How do I edit this code so that it also adds specific meta data into the user and subsequent CPT being created?