wordpress snippets last updated   : October 6, 2014
we now have 641 snippets

No excerpt available, display default message

wordpress snippet

Adding this snippet to your wordpress theme will allow you to display a default message when no excerpt has been added.

read more

Check if post has the_excerpt

wordpress snippet

Adding this PHP code to your wordpress theme will allow you to check if a post contains an excerpt. Wordpress will use the post as an excerpt when one does not exists so this is a great way to display the excerpt when not every post will contain one.

read more

Get the_excerpt outside loop

wordpress snippet

Adding this PHP code to your wordpress theme will let you display the post excerpt outside of the loop.

read more

Remove p tag from get_the_excerpt

wordpress snippet

Adding this PHP code to your wordpress theme will remove the <p> added by default to get_the_excerpt() functions.

read more