Code line in comments

Home Forums WordPress Themes – Premium Pure & Simple Code line in comments

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17227
    Aki Christina
    Participant

    Hey 🙂

    When there is a comment under an article a line of code appears above a comment.

    Can you fix it, please?
    kommentare.png

    Attachments:
    You must be logged in to view attached files.
    #22759
    Sushil Adhikari
    Moderator

    Hi

    Please add this following code on child theme functions.php file

    add_filter( 'wp_list_comments_args', 'pure_simple_child_comment_arg' );
    function pure_simple_child_comment_arg($r) {
    	$r['callback'] = 'puresimple_comment_child';
    	$r['avatar_size'] = 48;
    	$r['short_ping'] = true;
    	return $r;
    }
    
    
    function puresimple_comment_child($comment, $args, $depth) {
    	$GLOBALS['comment'] = $comment;
    	extract($args, EXTR_SKIP);
    
    	if ( 'div' == $args['style'] ) {
    		$tag = 'div';
    		$add_below = 'comment';
    	} else {
    		$tag = 'li';
    		$add_below = 'div-comment';
    	}
    	
    ?>
    	<  id="comment-">
    	
    	<div id="div-comment-" class="comment-body">
    	
    	
    <?php printf( __( '%s','puresimple' ), get_comment_author_link() ); ?>
    comment_approved == '0' ) : ?>
    $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    <?php }

    Note: Please use child theme functions.php file to add this custom css, otherwise your changes will lost on theme update.

    Thank

    #22761
    Aki Christina
    Participant

    Works fine. :cheer:

    Thank you.

    Will I have to leave the child functions.php for ever with this code, or is that something that will be fixed in a futute update of the man theme?

    If so, I will have to leave myself a note to maybe delete it along with a further update to avoid confusion / other conflicts.

    Greetings
    Aki Christina

    #17228
    Sushil Adhikari
    Moderator

    Hi Aki Christina,

    We will surely fixed this issue on next update , so you can remove those code after new update .

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.