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
- 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?
- Load custom posts with same tag as page
- Custom Post Type with Input fields to seperate table on database.
- Adding post tags to custom post types
- show tags of custom post type ONLY
- Get posts with tag all post types
- Custom post type or just use custom fields
- Show certain terms from custom taxonomy but exclude ‘parent’ terms?
- 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
- Using posts and postmeta table to store custom Address Book Plugin data
- How to use custom post type APIs, but use a different db table
- associate custom post type with tags with specific pages
- Developing WordPress on Kubernetes
- Custom Taxonomy – Tags Metabox is showing instead of Categories
- How to make a custom taxonomy selectable in post publish area?
- Add Tags to custom post type
- WordPress post count not showing for custom post type author
- Can custom taxonomies items have attached properties?
- Why does querying on post_tags (which has been applied to custom post types) only return posts?
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- Group posts by custom post type
- Tag page with Custom Post Types not returning any posts
- Sorting custom post type columns with external data and without meta values
- Custom post type getting wrong categories and tags
- Custom Tag Description unable to display just below and outside of the Loop
- Database to page routing API?
- Store CPT ‘Reviews’ average ratings to a WordPress DB table or to a DB custom table?
- How to display “Category and Post_tag” component in a CPT Gutenberg edit screen?
- How to change wp prefix for custom post type only?
- How to import a custom MySQL DB table into a WordPress custom post type
- How to get all tags of a custom post type by id
- WP_Query orderby and tax_query
- How to organise this data within WordPress
- Save custom post type to external database
- data-type=”” … needed post tags stripped of characters
- Dynamically output a class to an anchor tag depending on what tag is chosen
- Replace dynamically content in a custom database table when a custom post is created
- How to display custom post type tags?
- Save and user submitted data from a form and display them in the wp backend
- Dump custom post type database
- Tags not working in my custom post type
- How to list tags from custom post type attachments?
- Strip Characters From Tag Name
- Designing a custom post type with a minimum number of meta fields
- Why does my taxonomy have a category style div id?
- How can I create an automatic drop down menu with my tags?
- WordPress hook which triggers on post import
- Update all published posts at once
- Print all the tags from a custom post type
- 404 Page Not Found on /Page/2/ on Tag Page
- Default post_tag for custom post type
- Custom posts – tag pagination
- Ideas to connect external database table to wordpress posts as custom field source
- Database alteration: users who voted
- How to Display the tag content of Custom Post?
- Using custom post types WordPress network
- Custom post type tags not showing in search
- Issue with Custom Post Type Tags
- custom post type: own database table structure and custom “new-post” interface
- One post auto attached to many another items
- Navigate by Tags inside a custom Post Type
- How do you make relational post types in WordPress? [duplicate]
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- Search CPT by tag ids
- Does this archive template part look like its making too many calls to the db?
- when looping through custom post data not appearing
- How to set “section categories”?
- How select query is generated in a Custom Post Type?
- Exporting Post type from one theme and importing it to another theme
- custom data model – link and populate from admin backend
- Confused about where to store my data
- Automatically / dynamically populating tags in custom post type
- Event Manager: Events Deleted are still in DB as published but hidden in admin
- Rewrite url post_tag for custom post type
- Populate custom post type/custom fields from an external database
- Automatically convert standard posts with custom fields to custom post types
- Custom Post Type tag taxonomy “Page Not Found”
- CPT or Custom Table for Repository of Serial Numbers
- How can I include custom post types on a tag page?
- Filter custom post type by tags
- Loop multiple taxonomy in custom post
- Custom Post Type – Admin Columns
- Generating List of Tags from Custom Post Type
- Archive.php is not displaying tags
- Custom Post Type Tags Showing Under Regular Post Tags
- custom post type for custom talbe
- Return all wordpress custom posts in specific multidimensional array
- custom post type tags
- WordPress and Unity high scores table
- Tags and Taxonomy links not working for Custom Post Types
- Checking for published posts in a certain post type
- how insert how many post type in this function?
- WordPress Admin Page Slow. Customer Post Type is the slowest
- What would be the optimal CPT / Taxonomy design for the following entities structure