sanitize_text_field()
is intended to sanitize a value for use as plain-text. HTML tags are stripped in the process.
wp_kses()
may be a more appropriate sanitization helper for your use-case and can be passed a custom list of permitted HTML tags. Alternately, you can pass a context name to use a pre-defined set. To use the list which is used in the process of sanitizing post content, for instance:
update_term_meta( $term_id, $key, wp_kses( $value, 'post' ) );
See the Theme Security section of the Theme Handbook for more information on Data Sanitization/Escaping in WordPress.
Related Posts:
- Order get_terms() By Custom Field
- get_field not displaying my custom field value
- Add extra fields to Add New Category page
- Need help adding custom field to category
- adding custom fields to next and previous post link
- Custom query with category exclusion and post-meta “whitelist”
- Sort category page with custom field
- Create a full width responsive header image per page
- Category Descriptions – HTML?
- Return category slug / title from category ID
- Filter out posts before display category count
- How to put enctype=”multipart/form-data” in categories form?
- Add custom taxonomy under the category title
- Remove ‘rel’ attributes from the_category() output
- Add multiple=”multiple” attribute to categories dropdown
- How to call custom category field data in theme?
- query in category.php repeats itself
- need to add custom field in more products
- Retrieving category’s color with get_term_meta
- How to change a post category when the ACF datepicker Field is today
- Listing Texts of Which Custom Field is Null
- How to “group” (categorize) the Pages together?
- How to query categories with Advanced Custom Fields?
- How to add custom color fields to the category edit page?
- Notice: Trying to get property of non-object in : custom fields category
- Two columns in homepage each with one category
- echo get_post_meta of all post in a category to fill up a select field
- “Virtual category page” based on a custom field filter
- ACF no print data [closed]
- Displaying a custom field in Category Archives
- Assign a custom post to a custom taxonomy based on custom field value
- Custom Fields Value As Taxonomy
- Update custom category fields front-end
- What is the best way to add an advanced / intermediate / beginner tag to a post
- Show posts from category specified using a custom field
- Adding tinymce to Custom Field boxes on Category edit page
- How can i add service category here? [duplicate]
- Sort categories by custom field in WordPress admin
- How to prevent tag “iframe” from being deleted from the heading description of rubric?
- Modifying category order
- Displaying data from custom fields on a specific category page
- How can I add different custom fields for each category in the same post?
- How to display custom fields as table in Woocommerce
- How to modify custom category field from front end?
- Ajax Category add doesn’t update the list table custom column
- How to Manage and link certain custom taxonomy?
- Custom field picture instead of post thumbnail on category page
- How to loop through a custom field for each post, & display?
- $args Orderby The number
- ACF plugin categories bug in WordPress 3.9
- Formating content in category.php
- Logic for Nearby places with post and categories
- Sort categories by meta value
- How to structure Multisite sites into categories?
- Custom Fields to Category edit page, then displaying them in a template correctly
- How do I add and display a custom image field to a category? [duplicate]
- Converting Categories (with ACF fields) to custom taxonomies
- Add custom text in second paragraph of posts in specific category
- Get current category details the user is currently on in category.php
- Get Default Post Category From Settings
- Create subdomains for tags and categories
- Categories – create a new separate set right after the default?
- How to select product category while adding new product in woocommerce? [closed]
- How do I count how many top level categories there are?
- display most popular tags of category?
- Want to hide some categories from the categories meta box in the post editor for the two specific user roles
- Show Different Custom Menu on Different Category Pages
- How to get the id from the custom category?
- Combining post categories and link categories?
- Category being displayed without base parmalink
- wordpress sub-category ( lowercase letters + non-latin characters ) = 404
- WP didn’t redirect to canonical category URL
- Customize WordPress widget – Product Category
- Cross reference custom post types
- Display categories with child category separated by letter
- Is there a way to only show Custom Meta Data on single posts from certain catagories
- display a widget on specific category and its sub categories
- Custom page category taxonomy 404
- How to hide category
- How can i show categories of custom post
- Posts of specific category on page and excluded from index.htm
- How can assign posting to Subscriber to specific category?
- Exclude posts without category from loop
- remove url from categories
- how to style show_count in wp_list_categories()
- Page category filter in admin dashboard
- how to display specific Category if post have more one Category?
- Is there a way to fetch the category of a page when using wp_list_pages?
- How to fix 404 error in pagination in categories of woocommerce with common url base /shop/?
- How to delete WooCommerce categories in bulk that only have one product
- Product Category page showing all products
- Print categories and most viewed articles
- ACF Gallery with Media Categories – how do display categories and sort
- How to remove specific categories from tag archives?
- categories and sub-categories of posts are wrongly saved in DB
- How can I offer different RSS-Feeds by category?
- Printing out Main Category ID’s in a Loop
- How can i hide the authors box from a specific set of categories and post types?
- Build page base on category
- Restricted category in Woocommerce [closed]