0

I use an excerpt in a custom posttype and I would like to add or modify the existing text at the bottom of excerpt editor. I have no ideas ! Can someone help me ? Thanks

0

Try below code.

add_filter( 'gettext', 'excerpt_gettext', 10, 2 );
function excerpt_gettext( $translation, $original ) {
 $post_type = get_post_type( $_GET['post'] );
 if($post_type == 'your custom post type') {
   $text = strpos($original, 'Excerpts are optional hand-crafted summaries of your content that can be used in your theme');
   if ($text !== false) {
     return  'My Custom Excerpt Discription';
   }
 }
 return $translation;
}

NOTE: Change "your custom post type" with your actual post type name

Hope this will helps you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.