예제 #1
0
 /**
  * Returns a nice excerpt/content for the blog page.
  *
  * @return mixed|string|void
  *
  * @since 1.0.0
  *
  */
 function zen_get_the_excerpt()
 {
     global $post, $more, $pages;
     $more = 0;
     if (!has_excerpt($post->ID)) {
         $excerpt_length = apply_filters('excerpt_length', 55);
         $content = zen_get_the_clear_content();
         // check for more tag
         if (preg_match('/<!--more(.*?)?-->/', $post->post_content, $matches)) {
             //$content .= zen_get_content_more();
             // check content length
         } elseif (st_count_words($content) <= $excerpt_length) {
             add_filter('zen_get_content_more', 'zen_return_empty_string', 15);
         } else {
             $content = '';
         }
     }
     // if we got excerpt or content more than $excerpt_length
     if (empty($content) && get_the_excerpt()) {
         $content = apply_filters('the_excerpt', get_the_excerpt());
     }
     return $content;
 }
            <?php 
}
?>

            <div class="description no-icon" <?php 
echo $about_style;
?>
>
                <h1><?php 
_e('About', 'zen7');
?>
</h1>

                <?php 
echo zen_get_the_clear_content();
?>
        </div>

            <div class="category no-icon">

                <h1><?php 
_e('Category', 'zen7');
?>
</h1>

                <?php 
echo zen_get_portfolio_category();
?>

                <div class="clear"></div>