Hi @danildilawar
Yes, theres a built in filter function for that. (see inside examples.txct in the plugin root) which you add to your functions.php file or similar location (I suggest a child theme)
For your use case, you’ll need to use a conditional check for modifying the text on a per category use case.
Something like: (not tested on a live environment so please check the code)
function wp_post_nav_translate( $translated_text, $text, $domain ) {
//project category
if (is_category(‘project’)) {
switch ( $translated_text ) {
case ‘Category: ‘ :
$translated_text = __( ‘Project Category: ‘, ‘wp-post-nav’ );
break;
case ‘Previous Post’ :
$translated_text = __( ‘Previous Projext: ‘, ‘wp-post-nav’ );
break;
case ‘Next Post’ :
$translated_text = __( ‘Next Project: ‘, ‘wp-post-nav’ );
break;
}
}
//portfolio category
elseif (is_category(‘portfolio’)) {
switch ( $translated_text ) {
case ‘Category: ‘ :
$translated_text = __( ‘Portfolio Category: ‘, ‘wp-post-nav’ );
break;
case ‘Previous Post’ :
$translated_text = __( ‘Previous Portfolio: ‘, ‘wp-post-nav’ );
break;
case ‘Next Post’ :
$translated_text = __( ‘Next Portfolio: ‘, ‘wp-post-nav’ );
break;
}
}
return $translated_text;
}
add_filter( ‘gettext’, ‘wp_post_nav_translate’, 20, 3 );