I have a custom element in a page, which has a tagname of: column-set.

On the front end, that gets written as <column -set="">.

enter image description here


Why is this happening, and can it be changed? (I suspect it might have something to do with wpautop)

Edit: More Info

I've found that kses might be the issue here. So I've added this to my functions.php file:

add_action( 'init', 'allow_custom_elem' );

function allow_custom_elem() {

    global $allowedposttags;

    $tags = [ 'column-set', 'test-element' ];

    foreach ( $tags as $tag ) {

        if ( ! isset( $allowedposttags[ $tag ] ) ) {
            $allowedposttags[ $tag ] = [
                'class' => true,
                'id' => true,
                'style' => true




After my var_dump, I see that in the allow tags, I now have:

'test-element' => 
  array (size=3)
    'class' => boolean true
    'id' => boolean true
    'style' => boolean true

But it's still being written to the page a <test -element="">.

  • 1
    Search for kses on our site.
    – fuxia
    Mar 23, 2017 at 19:43
  • @toscho, I've added the custom element to kses and it's still not working.
    – Kelderic
    Mar 23, 2017 at 19:54

1 Answer 1


It's not kses. The culprit is this:


When I remove that, things work. I'm not sure why it's breaking things, but I'll look into the source later.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.