<?php 
        echo avada_render_post_title($post->ID, FALSE);
        ?>
			<?php 
    } elseif (!Avada()->settings->get('disable_date_rich_snippet_pages')) {
        ?>
			<span class="entry-title" style="display: none;"><?php 
        the_title();
        ?>
</span>
			<?php 
    }
    ?>
			<div class="post-content">
				<?php 
    echo avada_get_sermon_content();
    ?>
				<?php 
    avada_link_pages();
    ?>
			</div>
			<?php 
    if (!post_password_required($post->ID)) {
        ?>
			<?php 
        echo avada_render_post_metadata('single');
        ?>
			<?php 
        if (Avada()->settings->get('social_sharing_box')) {
            $sharingbox_soical_icon_options = array('sharingbox' => 'yes', 'icon_colors' => Avada()->settings->get('sharing_social_links_icon_color'), 'box_colors' => Avada()->settings->get('sharing_social_links_box_color'), 'icon_boxed' => Avada()->settings->get('sharing_social_links_boxed'), 'icon_boxed_radius' => Avada()->settings->get('sharing_social_links_boxed_radius'), 'tooltip_placement' => Avada()->settings->get('sharing_social_links_tooltip_placement'), 'linktarget' => Avada()->settings->get('social_icons_new'), 'title' => wp_strip_all_tags(get_the_title($post->ID), true), 'description' => wp_strip_all_tags(get_the_title($post->ID), true), 'link' => get_permalink($post->ID), 'pinterest_image' => $full_image ? $full_image[0] : '');
            ?>
Beispiel #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(fusion_get_theme_option('content_length')) == 'excerpt') {
             $content_excerpted = TRUE;
             // Get the excerpt length
             $excerpt_length = fusion_get_theme_option('excerpt_length_blog');
         }
         // Check if HTML should be stripped from contant
         if (fusion_get_theme_option('strip_html_excerpt')) {
             $strip_html = TRUE;
         }
         // Portfolio page templates
     } elseif ($excerpt == 'portfolio') {
         // Check if the content should be excerpted
         if (fusion_get_option('portfolio_content_length', 'portfolio_content_length', $page_id) == 'excerpt') {
             $content_excerpted = TRUE;
             // Determine the correct excerpt length
             if (fusion_get_page_option('portfolio_excerpt', $page_id)) {
                 $excerpt_length = fusion_get_page_option('portfolio_excerpt', $page_id);
             } else {
                 $excerpt_length = fusion_get_theme_option('excerpt_length_portfolio');
             }
         } else {
             if (!$page_id && fusion_get_theme_option('portfolio_content_length') == 'Excerpt') {
                 $content_excerpted = TRUE;
                 $excerpt_length = fusion_get_theme_option('excerpt_length_portfolio');
             }
         }
         // Check if HTML should be stripped from contant
         if (fusion_get_theme_option('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();
     }
 }
 /**
  * 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();
     }
 }