function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); echo $before_widget; if (!empty($title)) { if (!empty($instance['postlink'])) { if (get_option('show_on_front') == 'page') { $link = get_permalink(get_option('page_for_posts')); } else { $link = get_permalink(get_option('home')); } $before_title .= '<a href="' . $link . '">'; $after_title .= '</a>'; } echo $before_title . $title . $after_title; } $ul_classes = 'recent_posts_with_excerpts'; $ul_classes = apply_filters('recent_posts_with_excerpts_list_classes', $ul_classes); if (!empty($ul_classes)) { $ul_classes = ' class="' . $ul_classes . '"'; } $li_classes = ''; $li_classes = apply_filters('recent_posts_with_excerpts_item_classes', $li_classes); if (!empty($li_classes)) { $li_classes = ' class="' . $li_classes . '"'; } $h2_classes = 'recent_posts_with_excerpts'; $h2_classes = apply_filters('recent_posts_with_excerpts_heading_classes', $h2_classes); if (!empty($h2_classes)) { $h2_classes = ' class="' . $h2_classes . '"'; } do_action('recent_posts_with_excerpts_begin'); echo '<ul' . $ul_classes . '>'; // retrieve last n blog posts $q = array('posts_per_page' => $instance['numposts']); if (!empty($instance['ignore_sticky_posts'])) { $q["ignore_sticky_posts"] = $instance['ignore_sticky_posts']; } if (!empty($instance['cat'])) { $q['cat'] = $instance['cat']; } if (!empty($instance['offset']) && $instance['offset'] > 0) { $q['offset'] = $instance['offset']; } if (!empty($instance['tag'])) { $q['tag'] = $instance['tag']; } $q = apply_filters('recent_posts_with_excerpts_query', $q); $rpwe = new wp_query($q); $excerpts = $instance['numexcerpts']; $date = apply_filters('recent_posts_with_excerpts_date_format', $instance['date']); // the Loop if ($rpwe->have_posts()) { while ($rpwe->have_posts()) { $rpwe->the_post(); echo '<li' . $li_classes . '>'; if ($excerpts > 0 && $instance['thumb'] && $instance['thumbposition'] == 'above') { echo '<a href="' . get_permalink() . '">' . get_the_post_thumbnail(get_the_id(), $instance['thumbsize']) . '</a>'; } echo '<h2' . $h2_classes . '><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>'; if (!empty($date)) { echo '<h3 class="date">' . get_the_time($date) . '</h3>'; } if ($excerpts > 0) { // show the excerpt if ($instance['thumb'] && $instance['thumbposition'] == 'between') { echo '<a href="' . get_permalink() . '">' . get_the_post_thumbnail(get_the_id(), $instance['thumbsize']) . '</a>'; } ?> <blockquote> <?php // the excerpt of the post if (function_exists('the_excerpt_reloaded')) { the_excerpt_reloaded($instance['words'], $instance['tags'], 'content', FALSE, '', '', '1', ''); } else { the_excerpt(); } // this covers Advanced Excerpt as well as the built-in one if (!empty($instance['more_text'])) { ?> <p class="alignright"><small><a href="<?php the_permalink(); ?> "><?php echo $instance['more_text']; } ?> </a></small></p> </blockquote> <?php if ($excerpts > 0 && $instance['thumb'] && $instance['thumbposition'] == 'below') { echo '<a href="' . get_permalink() . '">' . get_the_post_thumbnail(get_the_id(), $instance['thumbsize']) . '</a>'; } $excerpts--; } ?> </li> <?php } } ?> </ul> <?php do_action('recent_posts_with_excerpts_end'); echo $after_widget; wp_reset_query(); }
the_author(); ?> --> <?php comments_popup_link('Nessun Commento »', '1 Commento »', '% Commenti »'); ?> | <?php if (function_exists('wp_email')) { email_link(); } ?> </p> <div class="entry"> <?php the_excerpt_reloaded(50, '', 'none', TRUE, '<small>continua »</small>', FALSE, 2); ?> </div> </div> <?php } ?> </div> <div id="bottombar"> <?php $my_query_vid = new WP_Query('cat=3&showposts=2');
the_time(get_option('date_format')); ?> , <?php the_time(get_option('time_format')); ?> , by <?php the_author(); ?> , under <?php the_category(', '); ?> .</div> <div class="entry"> <?php the_excerpt_reloaded(200, '<img>', TRUE, 'excerpt', 'Read Entire Article »'); ?> <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> </div> </div> <?php } ?> <div class="post"> <div class="navigation"> <div class="prev"><?php next_posts_link('« Older Entries'); ?>
'"><?php the_title(); ?> </a></h2> <p class="postdate"><?php the_time('l, j F Y'); ?> <!-- by <?php the_author(); ?> --></p> <div class="entry"> <?php if (function_exists('the_excerpt_reloaded')) { the_excerpt_reloaded(55, '', 'excerpt', TRUE, '[…]', FALSE, 2, TRUE, 0, 'span', 'Continue reading this entry', 0); } else { echo the_excerpt(); } ?> </div> <p class="postmetadata alt"><?php if (function_exists('the_tags')) { the_tags('Tags: ', ', ', '<br />'); } ?> Posted in <?php the_category(', '); ?> | <?php
function wp_the_excerpt_reloaded($args = '') { parse_str($args); if (!isset($excerpt_length)) { $excerpt_length = 120; } // length of excerpt in words. -1 to display all excerpt/content if (!isset($allowedtags)) { $allowedtags = '<a>'; } // HTML tags allowed in excerpt, 'all' to allow all tags. if (!isset($filter_type)) { $filter_type = 'none'; } // format filter used => 'content', 'excerpt', 'content_rss', 'excerpt_rss', 'none' if (!isset($use_more_link)) { $use_more_link = 1; } // display if (!isset($more_link_text)) { $more_link_text = "(more...)"; } if (!isset($force_more)) { $force_more = 1; } if (!isset($fakeit)) { $fakeit = 1; } if (!isset($fix_tags)) { $fix_tags = 1; } if (!isset($no_more)) { $no_more = 0; } if (!isset($more_tag)) { $more_tag = 'div'; } if (!isset($more_link_title)) { $more_link_title = 'Continue reading this entry'; } if (!isset($showdots)) { $showdots = 1; } return the_excerpt_reloaded($excerpt_length, $allowedtags, $filter_type, $use_more_link, $more_link_text, $force_more, $fakeit, $fix_tags, $no_more, $more_tag, $more_link_title, $showdots); }