Conditional for the_excerpt and the_content
-
Hi all,
I’m trying to modify my index.php, so when I add a text for the excerpt (the_excerpt), it will display it on my homepage but if I did not place any text, it will instead display the content (the_content) instead of the default first 55 words.
So far this is what I have but it’s not working..
<?php if (function_exists('the_excerpt')) { the_excerpt( );} else {the_content();} ?>Any help will be aprpeciated.
Thanks,
Abiel
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Conditional for the_excerpt and the_content’ is closed to new replies.