Show only excerpt that is manually filled from the field under the post
-
Hello,
What I am trying to achieve is to show the content I enter in the field “excerpt” when creating a post, as additional info under the title link on a page. What I need is for it to show only when there is something filled in the excerpt field. Right now it works but it generates and shows automaticly excerpt for the posts that I haven’t entered anything for excerpt in the post page. My loop code looks like this:<h3 ><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <p class="excstl"><?php remove_filter('the_excerpt', 'wpautop'); ?><?php the_excerpt(); ?></p>
My theme is based on Twenty ten.
Also how can I apply the css class to the excerpt, so when there is no content in it I don’t load the <p class=”excstl”> </p> around it ?
Please help, trying to find a solution in forums in google for over 2 hours now.
Thanks for your time.
- The topic ‘Show only excerpt that is manually filled from the field under the post’ is closed to new replies.