" . $this_page_content . "";
} // if( is_home() ) {
// --------------------------------------------------------
// Getting the title and description category and tag pages
// --------------------------------------------------------
if( is_category() || is_tag() ) {
$this_yy_pages_title = single_cat_title('', false);
$this_page_content = category_description();
} // if( is_category() || is_tag() ) {
// --------------------------------------------------------
// output the title and the description of the page/category
// --------------------------------------------------------
if( $yydev_theme_data['yy_pages_title_output'] == 1 ) {
$page_output .= "
";
} // if( empty($yydev_theme_data['yy_pages_title_output']) ) {
$page_output .= $this_page_content;
} // if( (is_home() && get_option('page_for_posts')) || is_category() || is_tag() ) {
// --------------------------------------------------------
// checking if there is a post and output the page content
// --------------------------------------------------------
while( have_posts() ) {
// --------------------------------------------------------
// Getting the post/page data
// --------------------------------------------------------
the_post();
// --------------------------------------------------------
// Getting post format if it's set
// --------------------------------------------------------
$format = "";
if( has_post_format() ) {
$format = "page-format-" . get_post_format();
}// if( has_post_format() ) {
// --------------------------------------------------------
// Checking if there is thumbnail image for the post
// --------------------------------------------------------
$thumbnail_content_class = "";
if ( has_post_thumbnail()) {
$thumbnail = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
$img_id = get_post_thumbnail_id( get_the_ID() );
$alt_text = get_post_meta($img_id , '_wp_attachment_image_alt', true);
if( empty($alt_text) ) {
$alt_text = get_the_title();
} // if(empty($alt_text)) {
$thumbnail_content_class = "blog-post-content-thumbnail";
} // if ( has_post_thumbnail()) {
// --------------------------------------------------------
// Creating all the page content and ouput it to the page
// --------------------------------------------------------
$get_yy_posts_class = get_post_class();
$get_yy_posts_class = implode(' ', $get_yy_posts_class);
$get_yy_posts_class = $get_yy_posts_class . ' blog-posts ' . $format;
$page_output .= "
";
$page_output .= "";
$page_output .= "
";
// --------------------------------------------------------
// Output the post thumbnail data
// --------------------------------------------------------
if( !empty($thumbnail_content_class) ) {
$page_output .= "
";
} // if( !empty($thumbnail_content_class) ) {
// --------------------------------------------------------
// including the post info line
// --------------------------------------------------------
$page_output .= "
";
$page_output .= "
";
// --------------------------------------------------------
// including the blog post info line data
// --------------------------------------------------------
if( $yydev_theme_data['yy_hide_blog_info_line'] == 0 ) {
$page_output .= include( get_theme_file_path( 'pages-structure/blog-page-assets/blog-post-info.php' ) );
} // if( $yydev_theme_data['yy_hide_blog_info_line'] == 0 ) {
// --------------------------------------------------------
// getting the post excerpt
// -------------------------------------------------------
$page_output .= "
" . get_the_excerpt() . "
";
$page_output .= "
";
$page_output .= "
";
// --------------------------------------------------------
// adding fast editing button to each post
// --------------------------------------------------------
if( $yydev_theme_data['yy_fast_editing_button'] == 1 ) {
$page_output .= include( get_theme_file_path( 'pages-structure/blog-page-assets/fast-editing-button.php' ) );
} // if( $yydev_theme_data['yy_fast_editing_button'] == 1 ) {
$page_output .= "
";
$page_output .= "";
$page_output .= "";
} // while( have_posts() ) {
// --------------------------------------------------------
// creating the blog pages if there are more than one page
// --------------------------------------------------------
if($wp_query->max_num_pages > 1) {
$page_output .= yydev_theme_show_pages(false);
} // if($wp_query->max_num_pages > 1) {
// --------------------------------------------------------
// output the page content into the page
// --------------------------------------------------------
echo $page_output;
} else { // if( have_posts() ) {
echo "