Skip to content

Instantly share code, notes, and snippets.

@mikeoberdick
Last active March 19, 2023 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeoberdick/ed365f3c8403a2ca8834a15a327fcb84 to your computer and use it in GitHub Desktop.
Save mikeoberdick/ed365f3c8403a2ca8834a15a327fcb84 to your computer and use it in GitHub Desktop.
PHP for creating a custom excerpt using the wp_trim function
<p><?php echo wp_trim_words( get_field('content_english'), 20, '...<a href = "' . get_permalink() . '" class = "teal fw-bold">Read More</a></p>' ) . '</p>'; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment