Home › Forums › Front End PM PRO › Some minor Changes . › Reply To: Some minor Changes .
April 19, 2018 at 1:08 am
#13479
Shamim Hasan
Keymaster
1. You can override viewmessage.php
template to achieve what you want. Instruction in https://www.shamimsplugins.com/docs/front-end-pm-pro/customization-front-end-pm-pro/change-templates/
2.+ 3. add following code in your child theme’s functions.php
add_filter('fep_message_table_columns', function( $columns ){
$columns['cus_count'] = 'count';
$columns['cus_date'] = 'date';
return $columns;
});
add_action( 'fep_message_table_column_content_cus_count', function(){
$args = array(
'post_type' => 'fep_message',
'post_status' => 'publish',
'post_parent' => fep_get_parent_id( get_the_ID() ),
'posts_per_page' => -1,
'order'=> 'ASC',
'fields' => 'ids'
);
echo count( get_posts( $args ) ) + 1;
});
add_action( 'fep_message_table_column_content_cus_date', function(){
the_time( 'M d, Y' );
});
add_action( 'fep_message_table_column_content_author', function(){
echo fep_user_name( get_the_author_meta('ID') );
});
add_filter( 'fep_formate_date', function( $h_time, $date, $d ){
return $date;
}, 10, 3);