Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Chris Scott

    (@chrisscott)

    There isn’t a widget currently, but one could be added–I just need to think of how one would work. Open to suggestions.

    In the mean time, your solution would be a good workaround.

    Thread Starter el-zorro

    (@el-zorro-1)

    It’s no biggie.

    workaround is fine. I wouldn’t waste any brain cycles..

    I’m keen to make this works for widget. My current widget code as below how can i display the second and third featured posts image?

    if ($r->have_posts() ) {
    		$output = '<div class="recent-posts-wrap">';
    		$output .= '<ul class="posts-list">';
    		while ( $r->have_posts() ) {
    			$r->the_post();
    			$output .= '<li class="clearfix">';
    			if ( $thumbnail != 'false' ) {
    				$output .= '<a class="thumbnail" href="' . get_permalink() . '" title="' . get_the_title() . '">';
    				if ( has_post_thumbnail() ) {
    					$output .= get_the_post_thumbnail( get_the_ID(), array( 105, 105 ),array( 'title' => get_the_title(), 'alt' => get_the_title() ) );
    				} else {
    					$output .= '<img src="' . THEME_IMAGES . '/post-thumbnail.png" width="105" height="105" title="' . get_the_title() . '" alt="' . get_the_title() . '"/>';
    				}
    				$output .= '</a>';
    			}
    			$output .= '<div class="post-extra-info">';
    			$title = get_the_title();
    			$output .= '<a class="post-title" href="' . get_permalink() . '" title="' . get_the_title() . '" rel="bookmark">' . $title . '</a>';
    			if ( in_array( 'time', $extra ) ) {
    				$output .= '<time datetime="' . get_the_time( 'Y-m-d' ) . '">' . get_the_date() . '</time>';
    			}
    			if ( in_array( 'desc', $extra ) ) {
    				global $post;
    				$excerpt = $post->post_excerpt;
    				$excerpt = apply_filters( 'get_the_excerpt', $excerpt );
    				$output .= '<p>' . wp_html_excerpt( $excerpt, $desc_length ) . '...</p>';
    			}
    			$output .= '</div>';
    			$output .= '</li>';
    		}
    		$output .= '</ul>';
    		$output .= '</div>';
    	}
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Widget’ is closed to new replies.