Custom general settings (textarea field) don't output HTML correctly
I add my custom fields in genearal settings page. One of them using Wordpress Editor - there i insert my HTML content. I creeated it using simple snippet:
add_action( 'admin_init', 'register_settings_wpse_57647' );
function register_settings_wpse_57647()
{
register_setting(
'general',
'opisproduktyseop',
'esc_html'
);
add_settings_section(
'site-guide',
'Publishing Guidelines',
'__return_false',
'general'
);
add_settings_field(
'opisproduktyseop',
'Enter custom message',
'print_text_editor_wpse_57647',
'general',
'site-guide'
);
}
function print_text_editor_wpse_57647()
{
$the_guides = html_entity_decode( get_option( 'opisproduktyseop' ) );
echo wp_editor(
$the_guides,
'sitepublishingguidelines',
array( 'textarea_name' = 'opisproduktyseop' )
);
}
The problem starts when i try display content from this field in my theme. HTML don't works:
I display it using:
echo get_option( 'produktyseoopis' );