Order tags, but not alphabetically

One way to do it is to store the order of the tags as post meta data, using the action set_object_terms which happens to pass the tags in the order they appear on edit, eg in your “functions.php”: // Called in admin on updating terms – update our order meta. add_action( ‘set_object_terms’, function ( $object_id, … Read more

Why is wp_kses not keeping style attributes as expected?

This is an older question, but here’s the answer for future generations: WordPress will check the styles against a list of allowed properties and it will still strip the style attribute if none of the styles are safe. The default allow list is: text-align margin color float border background background-color border-bottom border-bottom-color border-bottom-style border-bottom-width border-collapse … Read more