In my new theme, I am using this coded trick to display the excerpt on a single post only if I’ve got text inside. Usually if you use
the_excerpt and you don’t have one, it will fake one for you.
This is not something that I wanted to do on the single post page. So I used the following code to check if the excerpt existed.
if ( !empty( $post->post_excerpt ) ) :
Once this action is taken into account, you can factor in what code you want to out put if the
post_excerpt isn’t empty.
if ( !empty( $post->post_excerpt ) ) : the_excerpt(); else : false; endif;
The above code checks if there is an excerpt and print’s it to the screen. If there isn’t an except, it doesn’t do anything.
Random Search Terms
How to: Limiting the posts in you archive widget
I have show you how to create a custom widget in a previous post. But how about adding and additional...
I was just looking around and saw that Darren Hoyt has released Mimbo 3.0. If your looking for a nice...
Build a classic MyBlogLog widget
In this post I will show you how I created my custom widget showcasing mybloglog readers. In your function.php file...
powered by WassUp
Recent Posts: Fully Net Worth . com
Buck Henry was an American actor, screenwriter, and director best known for his directing the movie Heaven Can Wait. Buck Henry net worth before his death is estimated to be $6 million. Henry was born on December 9, 1930, in New York City to Ruth Taylor and Paul Steinberg Zuckerman. His mother was an actress […]
Andre Rison also known as Bad Moon is a retired American Football player who played for teams like Indianapolis Colts, Atlanta Falcons, Cleveland Browns, Green Bay Packers and Oakland Raiders. As of 2019, Andre Rison net worth is estimated to be around $200,000. Rison was born on March 18, 1967, in Flint, Michigan. He attended […]
ABG Neal is an upcoming rapper who is known for songs such as “Blurry”. He is also the CEO of a production & distribution company called Bix 8 Baby which he started only recently. As of 2019, ABG Neal net worth is estimated to be $150,000. Neal was born on November 19, 1995, in Brooklyn, […]