function pp_cat_posts($cat_id = '', $items = 5, $echo = TRUE, $show_thumb = TRUE) { $return_html = ''; $posts = get_posts('numberposts=' . $items . '&order=DESC&orderby=date&category=' . $cat_id); $title = get_cat_name($cat_id); $category_link = get_category_link($cat_id); $count_post = count($posts); if (!empty($posts)) { $return_html .= '<h2 class="widgettitle"><span>' . $title . '</span></h2>'; $return_html .= '<ul class="posts blog '; if ($show_thumb) { $return_html .= 'withthumb '; } $return_html .= '">'; foreach ($posts as $key => $post) { $return_html .= '<li>'; if (!empty($show_thumb) && has_post_thumbnail($post->ID, 'related_post')) { $image_id = get_post_thumbnail_id($post->ID); $image_url = wp_get_attachment_image_src($image_id, 'related_post', true); $return_html .= '<div class="post_circle_thumb"><a href="' . get_permalink($post->ID) . '"><img class="alignleft frame post_thumb" src="' . $image_url[0] . '" alt="" /></a></div>'; } $return_html .= '<a href="' . get_permalink($post->ID) . '">' . pp_substr($post->post_title, 50) . '</a><div class="post_attribute">' . date_i18n(THEMEDATEFORMAT, get_the_time('U', $post->ID)) . '</div>'; $return_html .= '</li>'; } $return_html .= '</ul><br class="clear"/>'; } if ($echo) { echo $return_html; } else { return $return_html; } }
?> /images/icon_zoom.png" alt=""/> </a> </span> </div> <br class="clear"/> <div class="portfolio_desc"> <br/> <h4 class="cufon"><?php echo $portfolio_item->post_title; ?> </h4><br/> <?php echo pp_substr(strip_tags(strip_shortcodes($portfolio_item->post_content)), 140); ?> <?php $pp_portfolio_hide_view = get_option('pp_portfolio_hide_view'); if (!empty($pp_portfolio_hide_view)) { $pp_portfolio_view_title = get_option('pp_portfolio_view_title'); if (empty($pp_portfolio_view_title)) { $pp_portfolio_view_title = 'View'; } ?> <br/><br/><br/> <input type="button" value="<?php echo $pp_portfolio_view_title; ?> " onclick="location.href='<?php
/> <?php if ($caption_align != 'No Caption') { ?> <span rel="<?php echo $caption_style; ?> ;z-index:99"> <h4><?php echo $gallery_item->post_title; ?> </h4> <?php echo pp_substr(strip_tags(strip_shortcodes($gallery_item->post_content)), 200); ?> </span> <?php } ?> </a> <?php } ?> </div> <?php
//end switch ?> <div class="portfolio_desc" style="width:490px;margin-top:5px"> <h6 class="cufon"><?php echo $portfolio_item->post_title; ?> </h6> <?php $pp_portfolio_display_desc = get_option('pp_portfolio_display_desc'); if (!empty($pp_portfolio_display_desc)) { ?> <span> <?php echo pp_substr(strip_tags(strip_shortcodes($portfolio_item->post_excerpt)), 220); ?> </span> <?php } ?> </div> </div> <?php } //End foreach loop ?>
} ?> <div class="two_third last"> <h6><a href="<?php the_permalink(); ?> " rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?> "><?php the_title(); ?> </a></h6><br/><?php echo pp_substr(strip_tags(strip_shortcodes($post->post_content)), 220); ?> </div> <br class="clear"/><br/><br/> <?php } wp_reset_query(); ?> </div> <br class="clear"/> <?php } } ?>
function ppb_blog_grid_func($atts, $content) { //extract short code attr extract(shortcode_atts(array('size' => 'one', 'slug' => '', 'title' => '', 'cat' => '', 'items' => '', 'padding' => '', 'custom_css' => '', 'link_title' => '', 'link_url' => ''), $atts)); $sec_id = ''; if (!empty($slug)) { $sec_id = 'id="' . esc_attr($slug) . '"'; } $return_html = ''; $return_html .= '<div class="standard_wrapper">'; $return_html .= '<div ' . $sec_id . ' class="' . $size . ' withsmallpadding"'; $custom_css .= 'padding:' . esc_attr($padding) . 'px 0 ' . esc_attr($padding) . 'px 0;'; if (!empty($custom_css)) { $return_html .= 'style="' . urldecode($custom_css) . '" '; } $return_html .= '>'; $return_html .= '<div class="page_content_wrapper"><div class="inner"><div class="inner_wrapper">'; if (!is_numeric($items)) { $items = 3; } //Get blog posts $args = array('numberposts' => $items, 'order' => 'DESC', 'orderby' => 'post_date', 'post_type' => array('post'), 'suppress_filters' => false); if (!empty($cat)) { $args['category'] = $cat; } $posts_arr = get_posts($args); if (!empty($posts_arr) && is_array($posts_arr)) { $return_html .= '<div class="blog_grid_wrapper sidebar_content full_width ppb_blog_posts">'; foreach ($posts_arr as $key => $ppb_post) { $animate_layer = $key + 7; $image_thumb = ''; if (has_post_thumbnail($ppb_post->ID, 'large')) { $image_id = get_post_thumbnail_id($ppb_post->ID); $image_thumb = wp_get_attachment_image_src($image_id, 'large', true); } $return_html .= '<div id="post-' . $ppb_post->ID . '" class="post type-post hentry status-publish"> <div class="post_wrapper grid_layout">'; //Get post featured content $post_ft_type = get_post_meta($ppb_post->ID, 'post_ft_type', true); switch ($post_ft_type) { case 'Image': default: if (!empty($image_thumb)) { $small_image_url = wp_get_attachment_image_src($image_id, 'blog', true); $return_html .= '<div class="post_img small"> <a href="' . esc_url(get_permalink($ppb_post->ID)) . '"> <img src="' . esc_url($small_image_url[0]) . '" alt="' . esc_attr($ppb_post->post_title) . '" class=""/> </a> </div>'; } break; case 'Vimeo Video': $post_ft_vimeo = get_post_meta($ppb_post->ID, 'post_ft_vimeo', true); $return_html .= do_shortcode('[tg_vimeo video_id="' . $post_ft_vimeo . '" width="670" height="377"]') . '<br/>'; break; case 'Youtube Video': $post_ft_youtube = get_post_meta($ppb_post->ID, 'post_ft_youtube', true); $return_html .= do_shortcode('[tg_youtube video_id="' . $post_ft_youtube . '" width="670" height="377"]') . '<br/>'; break; case 'Gallery': $post_ft_gallery = get_post_meta($ppb_post->ID, 'post_ft_gallery', true); $return_html .= do_shortcode('[tg_gallery_slider gallery_id="' . $post_ft_gallery . '" size="gallery_2" width="670" height="270"]'); break; } //End switch $return_html .= '<div class="blog_grid_content">'; //Check post format $post_format = get_post_format($ppb_post->ID); switch ($post_format) { case 'quote': $return_html .= ' <div class="post_header quote"> <div class="post_quote_title grid"> <a href="' . esc_url(get_permalink($ppb_post->ID)) . '"><p>' . $ppb_post->post_content . '</p></a> <div class="post_detail"> ' . get_the_time(THEMEDATEFORMAT, $ppb_post->ID) . ' '; $post_categories = wp_get_post_categories($ppb_post->ID); if (!empty($post_categories)) { $return_html .= __('In', PLUGINDOMAIN) . ' '; foreach ($post_categories as $c) { $cat = get_category($c); $return_html .= '<a href="' . esc_url(get_category_link($cat->term_id)) . '">' . $cat->name . '</a>'; } } $return_html .= '</div> </div> </div>'; break; case 'link': $return_html .= ' <div class="post_header quote"> <div class="post_quote_title grid"> ' . $ppb_post->post_content . ' <div class="post_detail"> ' . get_the_time(THEMEDATEFORMAT, $ppb_post->ID) . ' '; $post_categories = wp_get_post_categories($ppb_post->ID); if (!empty($post_categories)) { $return_html .= __('In', PLUGINDOMAIN) . ' '; foreach ($post_categories as $c) { $cat = get_category($c); $return_html .= '<a href="' . esc_url(get_category_link($cat->term_id)) . '">' . $cat->name . '</a>'; } } $return_html .= '</div>'; $return_html .= ' </div> </div>'; break; default: $return_html .= '<div class="post_header grid"> <h6><a href="' . esc_url(get_permalink($ppb_post->ID)) . '" title="' . get_the_title($ppb_post->ID) . '">' . get_the_title($ppb_post->ID) . '</a></h6> <div class="post_detail"> ' . get_the_time(THEMEDATEFORMAT, $ppb_post->ID) . ' '; $post_categories = wp_get_post_categories($ppb_post->ID); if (!empty($post_categories)) { $return_html .= __('In', PLUGINDOMAIN) . ' '; foreach ($post_categories as $c) { $cat = get_category($c); $return_html .= '<a href="' . esc_url(get_category_link($cat->term_id)) . '">' . $cat->name . '</a>'; } } $return_html .= '</div> </div>'; $return_html .= pp_substr($ppb_post->post_excerpt, 110); break; } $return_html .= ' </div> </div> </div>'; } $return_html .= '</div>'; } $return_html .= '</div></div></div></div></div>'; if (!empty($link_title) && !empty($link_url)) { $return_html .= '<a href="' . esc_url($link_url) . '" class="button continue_ppb_blog">' . urldecode($link_title) . '</a>'; } return $return_html; }
fit_landscape : 1, //Landscape images will not exceed browser width fit_always : 1, //Components navigation : 0, //Slideshow controls on/off thumbnail_navigation : 0, //Thumbnail navigation slide_counter : 0, //Display slide numbers slide_captions : 0, //Slide caption (Pull from "title" in slides array) progress_bar : 0, slides : [ //Slideshow Images <?php foreach ($all_photo_arr as $photo_id) { $image_url = wp_get_attachment_image_src($photo_id, 'original', true); $small_image_url = wp_get_attachment_image_src($photo_id, 'thumbnail', true); //Get image meta data $image_title = get_the_title($photo_id); $image_desc = get_post_field('post_content', $photo_id); $homeslides .= '{image : \'' . $image_url[0] . '\', thumb: \'' . $small_image_url[0] . '\', title: \'<div id="gallery_caption"><h2>' . pp_substr(addslashes(strip_tags($image_title)), 30) . '</h2><div class="gallery_desc">' . pp_substr(addslashes(trim(preg_replace('/\\s+/', ' ', $image_desc))), 80) . '</div></div>\'},'; } ?> <?php $homeslides = substr($homeslides, 0, -1); echo $homeslides; ?> ] }); }); <?php }
function widget($args, $instance) { extract($args, EXTR_SKIP); echo $before_widget; $items = empty($instance['items']) ? ' ' : apply_filters('widget_title', $instance['items']); if (!is_numeric($items)) { $items = 3; } if (!empty($items)) { $pp_portfolio_sort = get_option('pp_portfolio_sort'); if (empty($pp_portfolio_sort)) { $pp_portfolio_sort = 'ASC'; } $portfolio_items = get_posts('numberposts=' . $items . '&order=' . $pp_portfolio_sort . '&orderby=date&post_type=portfolios'); if (isset($portfolio_items) && !empty($portfolio_items)) { echo '<h2 class="widgettitle">Portfolio</h2>'; foreach ($portfolio_items as $key => $portfolio_item) { $image_url = ''; if (has_post_thumbnail($portfolio_item->ID, 'large')) { $image_id = get_post_thumbnail_id($portfolio_item->ID); $image_url = wp_get_attachment_image_src($image_id, 'large', true); } $permalink_url = get_permalink($portfolio_item->ID); $word_count = 400; if (!empty($image_url[0])) { $word_count = 100; } ?> <div class="portfolio_grid"> <?php if (!empty($image_url)) { ?> <div class="portfolio_image"> <a href="<?php echo $permalink_url; ?> "> <img src="<?php bloginfo('stylesheet_directory'); ?> /timthumb.php?src=<?php echo $image_url[0]; ?> &h=120&w=200&zc=1" alt="" class="frame"/> </a> </div> <?php } ?> <div class="portfolio_desc"> <h6 class="cufon"><a href="<?php echo $permalink_url; ?> "><?php echo $portfolio_item->post_title; ?> </a></h6> <p><?php echo pp_substr(strip_tags(strip_shortcodes($portfolio_item->post_content)), $word_count); ?> </p> </div> </div> <br class="clear"/> <?php } } } echo $after_widget; }
/** * Setup recent posts widget **/ function pp_posts($sort = 'recent', $items = 3, $echo = TRUE, $bg_color = 'black', $echo_title = TRUE) { $return_html = ''; if ($sort == 'recent') { $posts = get_posts('numberposts=' . $items . '&order=DESC&orderby=date&post_type=post&post_status=publish'); $title = 'Recent Posts'; } else { global $wpdb; $query = "SELECT ID, post_title, post_content FROM {$wpdb->prefix}posts WHERE post_type = 'post' AND post_status= 'publish' ORDER BY comment_count DESC LIMIT 0," . $items; $posts = $wpdb->get_results($query); $title = 'Popular Posts'; } if (!empty($posts)) { if ($echo_title) { $return_html .= '<h2 class="widgettitle">' . $title . '</h2>'; } $return_html .= '<ul class="posts blog ' . $bg_color . '_wrapper">'; foreach ($posts as $post) { $image_thumb = ''; if (has_post_thumbnail($post->ID, 'large')) { $image_id = get_post_thumbnail_id($post->ID); $image_thumb = wp_get_attachment_image_src($image_id, 'large', true); } $return_html .= '<li>'; if (!empty($image_thumb)) { $return_html .= '<a href="' . get_permalink($post->ID) . '"><img src="' . get_bloginfo('stylesheet_directory') . '/timthumb.php?src=' . $image_thumb[0] . '&h=75&w=75&zc=1" alt="" class="frame" /></a>'; } $return_html .= '<strong class="header"><a href="' . get_permalink($post->ID) . '">' . $post->post_title . '</a></strong><br/>'; $return_html .= pp_substr(strip_tags(strip_shortcodes($post->post_content)), 80) . '</li>'; } $return_html .= '</ul>'; } if ($echo) { echo $return_html; } else { return $return_html; } }
function ppb_blog_func($atts, $content) { //extract short code attr extract(shortcode_atts(array('size' => 'one', 'title' => '', 'cat' => '', 'items' => '', 'custom_css' => ''), $atts)); $return_html = '<div class="' . esc_attr($size) . '" '; if (!empty($custom_css)) { $return_html .= 'style="' . urldecode(esc_attr($custom_css)) . '" '; } $return_html .= '>'; $return_html .= '<div class="page_content_wrapper"><div class="inner">'; //Display Title if (!empty($title)) { $return_html .= '<h2 class="ppb_title">' . $title . '</h2>'; } if (!empty($content)) { $return_html .= do_shortcode(tg_apply_content($content)) . '<br class="clear"/><br/>'; } if (!is_numeric($items)) { $items = 3; } //Get blog posts $args = array('numberposts' => $items, 'order' => 'DESC', 'orderby' => 'post_date', 'post_type' => array('post'), 'suppress_filters' => 0); if (!empty($cat)) { $args['category'] = $cat; } $posts_arr = get_posts($args); if (!empty($posts_arr) && is_array($posts_arr)) { $return_html .= '<div class="blog_grid_wrapper">'; foreach ($posts_arr as $key => $ppb_post) { $image_thumb = ''; if (has_post_thumbnail($ppb_post->ID, 'large')) { $image_id = get_post_thumbnail_id($ppb_post->ID); $image_thumb = wp_get_attachment_image_src($image_id, 'large', true); } $return_html .= ' <div id="post-' . $ppb_post->ID . '" class="post type-post"> <div class="post_wrapper grid_layout">'; if (!empty($image_thumb)) { $small_image_url = wp_get_attachment_image_src($image_id, 'gallery_c', true); $return_html .= ' <div class="post_img"> <a href="' . esc_url(get_permalink($ppb_post->ID)) . '"> <img src="' . esc_url($small_image_url[0]) . '" alt="" class=""/> </a> </div>'; } $return_html .= '<div class="post_header grid_layout">'; //Get Post's Categories $post_categories = wp_get_post_categories($ppb_post->ID); if (!empty($post_categories)) { $return_html .= '<div class="post_subtitle">'; foreach ($post_categories as $c) { $cat = get_category($c); $return_html .= '<a href="' . esc_url(get_category_link($cat->term_id)) . '">' . $cat->name . '</a> '; } $return_html .= '</div>'; } $return_html .= '<h5><a href="' . esc_url(get_permalink($ppb_post->ID)) . '" title="' . esc_attr(get_the_title($ppb_post->ID)) . '">' . get_the_title($ppb_post->ID) . '</a></h5>'; $return_html .= '<div class="post_detail">'; $return_html .= get_the_time(THEMEDATEFORMAT, $ppb_post->ID) . ' '; //Get post author meta $author_name = get_the_author_meta('user_nicename', $ppb_post->post_author); $author_url = get_the_author_meta('user_url', $ppb_post->post_author); if (!empty($author_name)) { $return_html .= __('by', THEMEDOMAIN) . ' <a href="' . esc_url($author_url) . '">' . $author_name . '</a> '; } $return_html .= '</div>'; $return_html .= '</div><br class="clear"/><br/>'; $post_excerpt = pp_get_the_excerpt($ppb_post->ID); $return_html .= pp_substr(strip_shortcodes($post_excerpt), 100) . '<br/><br/><br/> <a class="readmore button transparent" href="' . esc_url(get_permalink($ppb_post->ID)) . '">' . __('Read More', THEMEDOMAIN) . '</a>'; $return_html .= ' </div> </div>'; } $return_html .= '</div>'; } $return_html .= '<br class="clear"/></div></div></div>'; return $return_html; }
echo get_permalink($prev_post->ID); ?> "> <h6><?php echo $prev_post->post_title; ?> </h6> </a> <div class="post_detail"> <?php echo date(THEMEDATEFORMAT, strtotime($prev_post->post_date)); ?> - <?php echo date(THEMETIMEFORMAT, strtotime($prev_post->post_date)); ?> </div> <?php echo pp_substr(strip_tags(strip_shortcodes($prev_post->post_content)), 110); ?> </div> </div> <?php } ?> <br class="clear"/> </div> <?php get_footer();
<a href="<?php echo esc_url(get_category_link($cat->term_id)); ?> "><?php echo esc_html($cat->name); ?> </a> <?php } } ?> </div> </div> <?php echo pp_substr(get_excerpt_by_id($post->ID), 110); ?> <?php break; } ?> </div> </div> </div> <!-- End each blog post --> <?php $key++; ?>
?> <a href="<?php echo esc_url(get_category_link($cat->term_id)); ?> "><?php echo esc_html($cat->name); ?> </a> <?php } } ?> </div> <?php echo pp_substr(strip_tags(strip_shortcodes(get_the_content())), 200); ?> </div> </div> </div> </div> </div> <br class="clear"/> <!-- End each blog post --> <?php } } ?>
?> </div> </div> <?php } if (have_posts()) { ?> <div id="portfolio_filter_wrapper" class="three_columns portfolio-content section content clearfix"> <?php while ($wp_query->have_posts()) { $wp_query->the_post(); $image_url = ''; $portfolio_ID = get_the_ID(); $portfolio_title = get_the_title(); $portfolio_excerpt = pp_substr(strip_tags(strip_shortcodes(get_the_excerpt())), 50); if (has_post_thumbnail($portfolio_ID, 'portfolio3')) { $image_id = get_post_thumbnail_id($portfolio_ID); $image_url = wp_get_attachment_image_src($image_id, 'portfolio3', true); $full_image_url = wp_get_attachment_image_src($image_id, 'full', true); } $portfolio_link_url = get_post_meta($portfolio_ID, 'portfolio_link_url', true); if (empty($portfolio_link_url)) { $permalink_url = get_permalink($portfolio_ID); } else { $permalink_url = $portfolio_link_url; } $portfolio_item_set = ''; $portfolio_item_sets = wp_get_object_terms($portfolio_ID, 'portfoliosets'); if (is_array($portfolio_item_sets)) { foreach ($portfolio_item_sets as $set) {
<a href="<?php echo esc_url(get_category_link($cat->term_id)); ?> "><?php echo esc_html($cat->name); ?> </a> <?php } } ?> </div> </div> <?php echo pp_substr(get_the_excerpt(), 170); ?> <?php break; } ?> </div> </div> </div> <!-- End each blog post --> <?php $key++; }
<a href="<?php echo esc_url($author_url); ?> "><?php echo $author_name; ?> </a> <?php } ?> </div> </div> <br class="clear"/><br/> <?php echo pp_substr(strip_shortcodes(get_the_excerpt()), 100); ?> <br/><br/><br/> <a class="readmore button transparent" href="<?php echo esc_url(get_permalink()); ?> "><?php echo _e('Read More', THEMEDOMAIN); ?> </a> <br class="clear"/> </div> </div>
function ppb_blog_func($atts, $content) { extract(shortcode_atts(array('title' => 'Recent News', 'items' => 8, 'cat_id' => '', 'size' => 'one', 'blog_url' => ''), $atts)); if (!is_numeric($items)) { $items = -1; } $args = array('numberposts' => $items, 'post_type' => array('post')); if (!empty($cat_id)) { $args['category'] = $cat_id; } $recent_posts_arr = get_posts($args); $return_html = '<div class="' . $size . '">'; if (!empty($title)) { $return_html .= '<div class="ppb_title"><h4>' . $title . '</h4></div>'; if (!empty($blog_url)) { $return_html .= '<div class="ppb_desc"><a href="' . $blog_url . '">' . __('/ Read Our Blog', THEMEDOMAIN) . '</a></div>'; } $return_html .= '<br class="clear"/>'; } foreach ($recent_posts_arr as $key => $recent_post) { if ($size == 'one') { $column_class = 'post_wrapper one_third'; $overlay_class = 'post_third'; } elseif ($size == 'two_third' or $size == 'two_third last') { $column_class = 'ppb_blog one_half'; $overlay_class = 'post_third'; } elseif ($size == 'one_half' or $size == 'one_half last') { $column_class = 'ppb_blog post_wrapper one_half'; $overlay_class = 'ppb_blog post_half'; } elseif ($size == 'one_third' or $size == 'one_third last') { $column_class = 'one'; $overlay_class = 'ppb_blog post_half'; } elseif ($size == 'one_fourth' or $size == 'one_fourth last') { $column_class = 'one'; $overlay_class = 'ppb_blog post_half'; } if ($size == 'one' && ($key + 1) % 3 == 0) { $column_class .= ' last'; } elseif (($size == 'two_third' or $size == 'two_third last') && ($key + 1) % 2 == 0) { $column_class .= ' last'; } //pp_debug($recent_post); $blog_title_html = '<h5><a href="' . get_permalink($recent_post->ID) . '">' . get_the_title($recent_post->ID) . '</a></h5>'; if ($size == 'one' or $size == 'two_third' or $size == 'two_third last') { if (has_post_thumbnail($recent_post->ID, 'blog3')) { $image_id = get_post_thumbnail_id($recent_post->ID); $image_thumb = wp_get_attachment_image_src($image_id, 'blog3', true); } } elseif ($size == 'one_half' or $size == 'one_half last' or $size == 'one_third' or $size == 'one_third last') { $blog_title_html = '<h3><a href="' . get_permalink($recent_post->ID) . '">' . get_the_title($recent_post->ID) . '</a></h3>'; if (has_post_thumbnail($recent_post->ID, 'blog2')) { $image_id = get_post_thumbnail_id($recent_post->ID); $image_thumb = wp_get_attachment_image_src($image_id, 'blog2', true); } } elseif ($size == 'one_fourth' or $size == 'one_fourth last') { $blog_title_html = '<h6><a href="' . get_permalink($recent_post->ID) . '">' . get_the_title($recent_post->ID) . '</a></h6>'; if (has_post_thumbnail($recent_post->ID, 'blog2')) { $image_id = get_post_thumbnail_id($recent_post->ID); $image_thumb = wp_get_attachment_image_src($image_id, 'blog2', true); } } $return_html .= '<div class="' . $column_class . '">'; if (isset($image_thumb[0])) { $return_html .= '<a href="' . get_permalink($recent_post->ID) . '">'; $return_html .= '<div class="' . $overlay_class . '_img_wrapper">'; $return_html .= '<img src="' . $image_thumb[0] . '" alt=""/>'; $return_html .= '<div class="' . $overlay_class . '_img_overlay">'; $return_html .= '<div class="overlay_icon_circle">'; $return_html .= '<img src="' . get_stylesheet_directory_uri() . '/images/icon_link.png" alt="" class=""/>'; $return_html .= '</div>'; $return_html .= '</div>'; $return_html .= '</div></a><br class="clear"/>'; } $return_html .= '<div class="post_header_wrapper">'; $return_html .= '<div class="post_header half">'; $return_html .= $blog_title_html; $return_html .= '<div class="post_detail">'; $return_html .= '<div class="post_detail_item">'; $return_html .= __('Date:', THEMEDOMAIN) . ' ' . date('d M Y', strtotime($recent_post->post_date)); $return_html .= '</div>'; $return_html .= '</div>'; $return_html .= '</div>'; $return_html .= '</div>'; $return_html .= '<div class="post_excerpt half">' . pp_substr(strip_tags($recent_post->post_content), 220) . '...<br/><br/>'; $return_html .= '<a class="button" href="' . get_permalink($recent_post->ID) . '">' . __('Read The Rest', THEMEDOMAIN) . ' →</a>'; $return_html .= '</div>'; $return_html .= '</div>'; if (($size == 'two_third' or $size == 'two_third last') && ($key + 1) % 2 == 0) { $return_html .= '<br class="clear"/><br/><br/>'; } if ($size == 'one_third' or $size == 'one_third last' or $size == 'one_fourth' or $size == 'one_fourth last') { $return_html .= '<br class="clear"/><br/><br/>'; } } $return_html .= '</div>'; return $return_html; }