Hey @cdexswzaq,
I hope you are fine today!
To modify the output, you have to use a custom script. you can use the script in multiple ways, I prefer the mu-plugins method. Please follow the below steps:
1: Create a mu-plugins folder inside the wp-content folder, if already not exists.
2: Create a PHP file with a name you like inside the mu-plugins folder. For example wps-team–modifications.php
3: Edit the PHP file you have just created, paste the below code, and save it.
<?php
/**
* This function will modify the WPS Team plugin's member name.
* It will add the designation if found at the end of the name with the '|' separator.
*/
function wpspeedo_team__title_modify( $title, $post_id ) {
if ( is_admin() ) return $title;
if ( is_singular('wps-team-members') ) return $title;
if ( get_post_type($post_id) !== 'wps-team-members' ) return $title;
$designation = get_post_meta( $post_id, '_designation', true );
if ( empty($designation) ) return $title;
return $title . ' | ' . $designation;
}
add_filter( 'the_title', 'wpspeedo_team__title_modify', 10, 2 );
Let me know how it goes. If you have any issue let me ping here. have a good day!
Please do not forget to give us a rating.