/** * This function helps iterating over a post and displaying it for page and category columns * * @param array $data is an array with all the data necessary for creating the html code * @return string $output the string returned contains the html code generated within the method */ function column_helper_loop_over_posts($data) { wp_reset_query(); $output = ""; $additional_loop = new WP_Query($data['query_post']); if ($additional_loop->have_posts()) { while ($additional_loop->have_posts()) { $additional_loop->the_post(); if ($data['value'] != $this->post_id) { global $more; $more = 0; } if (empty($data['link'])) { $link = get_permalink(); } else { $link = $data['link']; } //check if we can/should display image if (isset($data['image']) && $data['image'] != "" && strpos($data['display'], 'img') !== false) { $slider = new avia_slideshow(get_the_ID()); if (!empty($data['link'])) { $slider->set_links($link); } $output .= $slider->display_small($data['image'], $data['caption'], true); } //check if we should display post content if (strpos($data['display'], 'title') !== false) { $output .= "<div class='entry-content'>"; $output .= "<h3 class='dynamic-column-title'><a href='" . $link . "' rel='bookmark' title='" . __('Permanent link:', 'avia_framework') . " " . get_the_title() . "'>" . get_the_title() . "</a></h3>"; $output .= '</div>'; } //check if we should display post content if (strpos($data['display'], 'post') !== false) { $output .= "<div class='entry-content'>"; $output .= "<h3 class='dynamic-column-title'><a href='" . $link . "' rel='bookmark' title='" . __('Permanent link:', 'avia_framework') . " " . get_the_title() . "'>" . get_the_title() . "</a></h3>"; if (!$additional_loop->post->post_excerpt || $data['value'] == $this->post_id) { $content = get_the_content('<span class="inner_more">' . __('Read more →', 'avia_framework') . '</span>'); $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); } else { $content = apply_filters('the_excerpt', get_the_excerpt()); $content .= '<p><a class="more-link" href="' . get_permalink() . '"><span class="inner_more">' . __('Read more →', 'avia_framework') . '</span></a></p>'; } $output .= $content; $output .= '</div>'; } } } wp_reset_query(); return $output; }
?> <div class='post-entry'> <!--meta info--> <div class="blog-meta grid3"> <?php //force to display small inline content slider on archive pages. Single pages and posts are allowed to display the 3d slider $force_small_slider = true; if (is_singular()) { $force_small_slider = false; } $slider = new avia_slideshow(get_the_ID()); echo $slider->display_small('portfolio', $force_small_slider); ?> <span class='post-date-comment-container'> <span class='date-container'><strong><?php the_time('d'); ?> <?php the_time('M'); ?> </strong><span><?php the_time('Y'); ?> </span></span> <span class='comment-container'><?php comments_popup_link("<strong>0</strong> " . __('Comments', 'avia_framework'), "<strong>1</strong> " . __('Comment', 'avia_framework'), "<strong>%</strong> " . __('Comments', 'avia_framework'), 'comments-link', "<strong></strong> " . __('Comments<br/>Off', 'avia_framework'));
<div class='post-entry'> <?php //call the function that displays featured images and slideshows within posts if (strpos($avia_config['layout'], 'big_image') !== false) { $image_size = 'page'; } if (strpos($avia_config['layout'], 'fullwidth') !== false) { $image_size = 'featured'; } if (strpos($avia_config['layout'], 'medium_image') !== false) { $image_size = 'blog'; } $slideHtml = $slider->display_small($image_size); if ($slideHtml) { echo $slideHtml; $avia_config['slider_first_post_active'] = true; } ?> <div class="entry-content"> <?php //echo "<h1 class='post-title'>".get_the_title()."</h1>"; //display the actual post content the_content(__('Read more →', 'avia_framework')); //check if this is the contact form page, if so display the form $contact_page_id = avia_get_option('email_page');
} // check if we got posts to display: if (have_posts()) { while (have_posts()) { the_post(); $slider = new avia_slideshow(get_the_ID()); if (empty($avia_config['layout'])) { $avia_config['layout'] = "big_image sidebar_right"; } ?> <div class='post-entry'> <?php if (strpos($avia_config['layout'], 'big_image') !== false) { $slideHtml = $slider->display_small('page'); } if (strpos($avia_config['layout'], 'dual-sidebar') !== false) { $slideHtml = $slider->display_small('blog'); } if (isset($slideHtml) && $slideHtml) { echo $slideHtml; $avia_config['slider_first_post_active'] = true; } if (!is_single()) { ?> <h1 class='post-title'> <a href="<?php echo get_permalink(); ?> " rel="bookmark" title="<?php