how to use the_editor() in wordpress
-
Hello,
As per client requirement I have added one more description field to category section. They are able to add the description but the format in which they have added is not getting displayed as such in front end. in backend, if they click on enter the new line is started in next line but in front end it shows in same line. How to solve this.
code that is used to create editor in admin is <?php the_editor($bottom_desc, $id = ‘bottom_desc’, $prev_id = ‘title’, $media_buttons = true, $tab_index = 2); ?>
To save
$bottom_desc = filter_input(INPUT_POST, ‘bottom_desc’);
update_term_meta($term_id, ‘bottom_desc’, $bottom_desc);and for displaying the content in front end
<?php echo htmlspecialchars_decode($CatbottomDesc); ?>I am able to get the description as well as able to display the images if added using htmlspecialchars_decode function but not able to decode enter action.
- The topic ‘how to use the_editor() in wordpress’ is closed to new replies.