Widget
-
Is there a way to to add a widget that would contain the secondary image?
I’m sure this can be done just pasting the PHP that (mentioned in the installation) into something like the Enhanced Text Widget but I was wondering if maybe there was a more streamlined way…
Viewing 3 replies - 1 through 3 (of 3 total)
-
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.
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.