• Resolved bulbusmaximus

    (@bulbusmaximus)


    I was able to import reviews and could add tags such as <h3>, <span>, <p>. However now I am unable to import like this and also when I manually want to edit in the editor, once updated it defaults back to only the allowed tags such as strong em link blockquote del ul li code

    Kindly help me out so I can show some rich text in the review content. Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • cusrevsupport9

    (@cusrevsupport9)

    Hi,

    Thank you for using CusRev.

    WordPress itself does not support adding those HTML tags to the comment content area. If you are familiar with coding, you can add this custom PHP code to the file functions.php in the theme/child theme folder to use those tags.

    add_filter( 'preprocess_comment', 'wpse_340526_preprocess_comment' );
    
    function wpse_340526_preprocess_comment( $commentdata ) {
        if( 'wpse_response' === $commentdata['comment_type'] ){
            global $allowedtags;
            $allowedtags['pre'] = array('class'=>array());
            $allowedtags['h2'] = array();
            $allowedtags['h3'] = array();
            $allowedtags['h4'] = array();
            $allowedtags['h5'] = array();
            $allowedtags['h6'] = array();
            $allowedtags['ul'] = array();
            $allowedtags['ol'] = array();
            $allowedtags['li'] = array();
        }
    
        return $commentdata;
    }

    Read more on this topic How to allow more HTML tags in comment for a certain comment_type

    cusrevsupport9

    (@cusrevsupport9)

    We haven’t heard from you for more than two weeks. For this reason, I’ll assume that either you are not interested in this question/problem anymore or it has been resolved. If you still require any help, please start a new forum topic.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I want to use rich html tags when importing reviews and also in the editor’ is closed to new replies.