You can use the update_user_meta
function in WordPress to store information about the user’s interest in promoting a campaign
// Assuming $user_id is the current user's ID and $campaign_id is the ID of the campaign.
update_user_meta($user_id, 'promoted_campaigns', $campaign_id, true);
Related Posts:
- Get terms by taxonomy AND post_type
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- Taxonomy, Terms, and Template Files
- Exclude a category from WP_Query
- Get Custom Taxonomy ID within loop
- Custom Post Types not showing on Custom Taxonomy archive page
- custom post type or taxonomy
- How do I Filter Custom Post Type by Custom Taxonomy in the newest WordPress RESTful API?
- Changing the priority of a custom taxonomy’s metabox
- How to list all categories and tags in a page?
- TV Show database – Best way for structuring it?
- How to setup a Custom Taxonomy Term template
- Admin to user notices – best practices?
- Retrieve a specific field from taxonomy term through advanced custom fields [closed]
- Many to Many Taxonomies or rewrite rules?
- Query posts by custom post type and custom taxonomy
- Custom Taxonomy List links being re-written
- front end radio custom taxonomy with custom post type
- How to display the rest of categories on Portfolio filterable
- Bulk 301 redirect for custom post type
- How to query custom post type by term?
- Associate Taxonomies Across Post Types
- ‘category__and’ for custom taxonomy?
- Custom post query by taxonomy
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- How can I show recent posts from same taxonomy as the post currently being viewed?
- How to get the first term for the current taxonomy?
- Group custom posts by custom taxonomy names
- Display Posts in Custom Post Types Timber
- How to query custom post types posts filtered by multiple custom taxonomies through a form selection
- Get post from custom post type order by two taxonomies
- How to convert custom post type based list to a dropdown list?
- Wrong request query on cpt and tax
- Getting a PHP Notice when using Pods with WPML [closed]
- Custom Taxonomy Archives on Custom Post type Page [duplicate]
- Custom post type multiple loop by taxonomy term
- Extending AZIndex plugin to use custom post types and custom taxonomies
- How to display custom taxonomies with links in filter menu?
- Cannot add category or custom taxonomy from admin. WordPress site is hosted in Windows 16 server via IIS. No XAMPP or WAMP
- How to Filter custom post type by taxonomy?
- Listing posts under primary and secondary taxonomies
- What’s the WP way to load remaining custom posts?
- Is it better to use WordPress Custom Post Types or Taxonomies?
- Search by tag name and category
- Listing custom terms in custom post meta
- WordPress subpages to custom post types
- get_the_title() is returning results from previous loop
- How do I display a list showing custom post types nested within a taxonomy?
- Display posts with tag for custom post type only
- Can’t use pagination with custom taxonomy
- Hide specific taxonomies from a taxonomy list using ‘get_object_taxonomies’
- get_category_link() for custom post type does not include custom slug rewrite?
- Targeting categories in custom fields
- How to show all taxonomies within custom post type loop
- Showing taxonomy terms on custom post type
- Custom Search | check multiple meta_value for search value
- get_terms() returns Trying to get property of non-object error for custom taxonomy
- How to list custom post types on a custom post type page?
- Custom post type categories gives 404 error
- Using WP_Query, I want to show posts that are associated with a custom taxonomy term
- Query Posts that have Custom Taxonomy
- Custom Taxonomy Terms in Menu lead to which page?
- Multiple archives to display parent and subcategories content
- Foreach loop returning more than one item when querying taxonomy
- Compare Two Custom Post Types Using The Same Custom Taxonomy
- How to List Custom Post Type Titles Based on Theirs Taxonomy Terms Inside a Nested Loop
- Most viewed post of custom post type
- Custom taxonomy and post type rewrite rules
- Custom post type page with parameter
- “Menu order” being ignored when querying posts from a parent taxonomy with “include_children” set to true
- How can I loop at a Specific Taxonomy from a custom post type?
- Display custom post type taxonomy in a WordPress excerpt for current post
- How do I Create Single template for custom post type with a custom URL?
- Tags being removed upon updates to related posts: ACF/Genesis/WP5.4.1
- How can I write slugs / permalinks as: custom post type -> custom taxonomy and custom post type -> custom taxonomy (one CPT and many taxo)?
- pagination problem listing custom post types of taxonomy in wordpress
- Display CPT taxonomies as an archive page
- How to Use A Custom Post Type as Taxonomy for Another Custom Post Type
- How to manage a dynamic multi-level page hierearchy system?
- Categories manage
- Templates for CPT not working
- Register post type getting error 404
- Which File Populating CPTs in Slug URL
- Add tags to a “pending” post before publishing
- What am I doing wrong with my taxonomy?
- Help with Multi Level Category Archive Page
- CPT url rewriting : regular posts return 404 error
- Pagination fault in custom post type archive page [duplicate]
- One custom post type with two different url structure base on taxonomy term
- wp_query: How to retrieve current term slug in custom taxonomy?
- tax_query showing no results
- Display posts from category in page
- Custom Loop for custom post type. Compare by meta_value?
- get tags from custom post type
- Highlight specific menu item when custom post is page
- Attaching multiple custom taxonomies to one CPT?
- Output assigned custom taxonomy to custom post type
- Custom Field Search
- Create a WordPress loop that shows posts from a custom post type + filters the posts by taxonomies while hiding empty taxonomies
- Add Custom Taxonomy Terms as CSS Classes for CPT Posts in an Elementor Loop Item Template