WordPress   

Create multiple excerpt lengths for different needs in WordPress

Sometimes we need custom excerpt length in our custom WordPress website for each excerpt, for example in sidebars, widgets, archives etc. In these situtation this small snippet can come handy.

echo wp_trim_words( get_the_content(), 20, '...' );
Need Professional Support for Your Website Problems?

Whether you're facing website issues or struggling with code implementation, our team is here to assist. Hire us to get your website back on track.

Hire Us