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
Adding a external file after the first post
How might you display a Google ad after the first post or anything you like? It is very simple. You...
A simple way to query posts
Here is a simple way to call query_posts with an array of options. For all options you my use visit:...
Adding a favicon to your site
Looking to add a favicon to you site? Inside your WordPress theme’s functions file (functions.php) add the following to inside...
The launch of WordPress 2.8
Wow, have you heard? WordPress has announced that the newest version, 2.8 which was thought to be held off till...
powered by WassUp
Recent Posts: Fully Net Worth . com
James Daniel Jordan, also known as Jim Jordan, is an American politician and former wrestler. He is part of the U.S. Representative for Ohio’s 4th congressional district since 2007. Moreover, he is also a ranking member of the House Oversight Committee since 2019. As of 2019, Jim Jordan net worth is estimated to be $400,000. […]
Scott C. Borchetta is an American record executive and entrepreneur. He is the founder of Big Machine Label Group which has four subsidiaries which are Machine Records, BMLG Records, The Valory Music Co., and Nash Icon Records. As of 2019 Scott Borchetta net worth is estimated to be $230 million. Borchetta was born on July […]
Kailyn Rae Lowry is an American reality television personality and author. She is best known for being a regular cast member of the reality television series 16 and Pregnant which she became a part of in 2010. As of 2019, Kailyn Lowry net worth is estimated to be $500,000. Lowry was born on March 14, […]