For the first time today I wanted to add an excerpt to a WP page, and guess what? It was not supported by WP. But, luckily after a little bit of looking around I found this single line of PHP that makes it possible
add_post_type_support( 'page', 'excerpt');
Just add this line of code to your functions.php file and that’s it!
The credit for coming up with this goes to Michael Fields.




How to check if a post has a term of a taxonomy
Often I find that I want to load a different template depending on what a term of a taxonomy a post has been given. It is a simple if has term check.
This is the code:
if (has_term( 'video', 'article_type', $post->ID )) { require_once('video.php'); } else { require_once('article.php'); }