Reply To: Enlightenment – Leave a comment or reply

#21569
Daniel Tara
Keymaster

Here’s the code to display the link in the post’s footer:

add_action( 'wp', 'enlightenment_child_wp_actions', 20 );

function enlightenment_child_wp_actions( $args ) {
  if( ! is_singular() ) {
    add_action( 'enlightenment_entry_footer', 'enlightenment_entry_meta' );
  }
}

add_filter( 'enlightenment_comments_link_args', 'enlightenment_child_filter_comments_link_args', 12 );

function enlightenment_child_filter_comments_link_args( $args ) {
  if( is_singular() || 'post' != get_post_type() ) {
    return $args;
  }
  
  if( doing_action( 'enlightenment_entry_footer' ) ) {
    	$args['format']['zero'] = __( 'Leave a comment', 'enlightenment-child' );
    	$args['format']['one']  = __( 'Leave a comment', 'enlightenment-child' );
    	$args['format']['more'] = __( 'Leave a comment', 'enlightenment-child' );
  }
  return $args;
}

Wether you use a child theme or not is your choice. The code needs to go in the functions.php file. I prefixed them with enlightenment_child so their names don’t conflict with existing functions.

Later edit: You also need to add this bit of code:

add_filter( 'enlightenment_entry_meta_args', 'enlightenment_child_filter_entry_meta_args', 12 );

function enlightenment_child_filter_entry_meta_args( $args ) {
  if( is_singular() || 'post' != get_post_type() ) {
    return $args;
  }
  
  if( doing_action( 'enlightenment_entry_footer' ) ) {
    $args['format'] = '%5$s';
  }
  return $args;
}