• Resolved enkirch

    (@enkirch)


    Hi,
    i want to place HTML-Entity in the table.

    Right now, the HTML-Entity getting “converted” to the “normal Character”.

    &#196 turns into an Ä. But i want to show the &#196

    • This topic was modified 4 months ago by enkirch.
    • This topic was modified 4 months ago by enkirch.
    • This topic was modified 4 months ago by enkirch.
Viewing 1 replies (of 1 total)
  • Plugin Author Johann Heyne

    (@jonua)

    Good question. There is no way to write and keep HTML-Entities. I would go with a shortcode. [entity code=”196″]. Do you know how to write a shortcode? See https://codex.wordpress.org/Shortcode_API

    Put this to functions.php

    add_shortcode( 'entity', function( $atts ) {
    	$a = shortcode_atts( array(
    		'code' => '',
    	), $atts );
    
    	return '&#' . $a['code'] . ';';
    } );

    Use echo do_shortcode( $td['c'] ); to echo a table cells content.

    Cheers,
    Johann

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.