Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // get the manual excerpt
- $post = get_post( $page->ID );
- $the_excerpt = $post->post_excerpt;
- // if manual excerpt is present, show it otherwise first 40 words of the Page content
- if ( empty( $the_excerpt ) ) {
- echo '<div class="excerpt">' . excerpt( '40' ) . '</div>';
- } else {
- echo '<div class="excerpt">' . $the_excerpt . '</div>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement