Esempio n. 1
0
            ?>
							<h4><?php 
            echo get_the_term_list($post->ID, 'portfolio_category', '', ', ', '');
            ?>
</h4>
							<?php 
            echo avada_render_rich_snippets_for_pages(false);
            ?>

							<?php 
            /**
             * For boxed layouts add a content separator if there is a post content
             */
            ?>
							<?php 
            if ('boxed' == $current_page_text_layout && avada_get_portfolio_excerpt_length($current_page_id) !== '0') {
                ?>
								<div class="fusion-content-sep"></div>
							<?php 
            }
            ?>

							<div class="fusion-post-content">
								<?php 
            /**
             * avada_portfolio_post_content hook
             *
             * @hooked avada_get_portfolio_content - 10 (outputs the post content)
             */
            do_action('avada_portfolio_post_content', $current_page_id);
            ?>
Esempio n. 2
0
 /**
  * Return the post content, either excerpted or in full length
  * @param  string	$page_id		The id of the current page or post
  * @param  string 	$excerpt		Can be either 'blog' (for main blog page), 'portfolio' (for portfolio page template) or 'yes' (for shortcodes)
  * @param  integer	$excerpt_length Length of the excerpts
  * @param  boolean	$strip_html		Can be used by shortcodes for a custom strip html setting
  *
  * @return string Post content
  **/
 function fusion_get_post_content($page_id = '', $excerpt = 'blog', $excerpt_length = 55, $strip_html = FALSE)
 {
     $content_excerpted = FALSE;
     // Main blog page
     if ($excerpt == 'blog') {
         // Check if the content should be excerpted
         if (strtolower(Avada()->settings->get('content_length')) == 'excerpt') {
             $content_excerpted = TRUE;
             // Get the excerpt length
             $excerpt_length = Avada()->settings->get('excerpt_length_blog');
         }
         // Check if HTML should be stripped from contant
         if (Avada()->settings->get('strip_html_excerpt')) {
             $strip_html = TRUE;
         }
         // Portfolio page templates
     } elseif ($excerpt == 'portfolio') {
         // Check if the content should be excerpted
         $portfolio_excerpt_length = avada_get_portfolio_excerpt_length($page_id);
         if ($portfolio_excerpt_length !== false) {
             $excerpt_length = $portfolio_excerpt_length;
             $content_excerpted = TRUE;
         }
         // Check if HTML should be stripped from contant
         if (Avada()->settings->get('portfolio_strip_html_excerpt')) {
             $strip_html = TRUE;
         }
         // Shortcodes
     } elseif ($excerpt == 'yes') {
         $content_excerpted = TRUE;
     }
     // Sermon specific additional content
     if ('wpfc_sermon' == get_post_type(get_the_ID())) {
         $sermon_content = '';
         $sermon_content .= avada_get_sermon_content(true);
         return $sermon_content;
     }
     // Return excerpted content
     if ($content_excerpted) {
         $stripped_content = fusion_get_post_content_excerpt($excerpt_length, $strip_html);
         return $stripped_content;
         // Return full content
     } else {
         ob_start();
         the_content();
         return ob_get_clean();
     }
 }