You’re not quoting your HTML attributes – one section should be:
if ( has_post_thumbnail() ) {
$image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID));
echo "<a href="https://wordpress.stackexchange.com/questions/217333/$link"><img src="$image[0]" width="98" height="80" class="img-responsive" /></a>";
} else {
echo "<img src="$url" >";
}
…the other should be:
echo "<h3><a href="https://wordpress.stackexchange.com/questions/217333/$link">";
the_title();
echo "</a></h3>";
echo "<div class="post-meta"><span class="date-meta">On <a href="https://wordpress.stackexchange.com/questions/217333/$link">";
the_time( get_option( 'date_format' ) );
echo "</a></span></div>";
Related Posts:
- How to disable WordPress from creating thumbnails?
- How do I regenerate thumbnails?
- Add Title Attribute to WordPress Image the_post_thumbnail
- Replacing Gutenberg Featured Image control?
- oEmbed, thumbnails and wordpress
- media_sideload_image generates blank?
- Showing a placeholder/default img, if no featured image is set
- Re-order media links?
- the_post_thumbnail scaling not hard cropping
- Featured Image Inherited from Parent Page
- Change wording of default thumbnail metabox
- Specific featured image for each category
- how to pull images with no add_theme_support(‘post_thumbnails’)
- Can WordPress crop only the post thumbnails?
- Query the post which have a thumbnail
- How to show a featured image as current?
- How can I get a different image size, if all I have is the link?
- Show current page featured image in sidebar
- wordpress responsive image srcset not working
- Importing featured image to posts, duplicates the image
- How do I set a featured image (thumbnail) by image URL when using wp_insert_post()?
- Use post thumbnail as div background
- How do I set the default “feature image” size?
- Featured Image missing in WordPress 3.2 Admin
- Long Post Title Misaligning Grid with Featured Image
- Change post thumbnail using front end post edit form
- Featured image thumbnail sometimes in content, sometimes changes header images
- Function to replace the url of featured images in the wordpress database?
- has_post_thumbnail gives always TRUE
- Displaying wordpress image size as array used for page builder
- Getting images to show up in RSS Reader
- how i can increase Featured thumbnails size?
- Setting a default placeholder image WITHOUT link
- If I Regenerate Thumbnails, would WordPress delete the existing Thumbnails and replace them with ‘new copies’?
- how to use first post image as thumbnail on wordpress
- Make the first image the post thumbnail without setting it as the featured image
- set a chosen image-file-input as a featured image from wp frontend
- Aligning the thumbnail image
- Muliple featured images (or just images) per post
- How do get post thumbnail into plugin?
- Default Featured Image from Post content
- wp_get_attachment_image_src match smallest edge
- Can’t Set Featured Image [closed]
- Resize post thumbnail produces horrible image quality..Any help?
- media-library: how to insert thumbnails with a fixed width, regardless of landscape/portrait orientation
- Remove the link to a featured image if and only if it’s not a gif
- Post thumbnail outside of loop
- How to query posts with featured images
- query_posts adding two “post-entry” divs
- Display a thumbnail outside of the loop for a page
- How to use get_the_title with text on the ‘alt’ of the_thumbnail array?
- the_title() is not displaying over the_thumbnail
- remove_image_size doesn’t seem to be working
- Get Featured Image Outside Loop Not Working
- Responsive scaling of image for the_post_thumbnail() [closed]
- Show posts image attachments
- images not showing despite using add_theme_support(‘post-thumbnails’);
- post thumbnail: increase dimension if smaller than… Possible?
- Displaying caption with featured image
- Featured Image meta box shows at the bottom?
- add_theme_support post-thumbnails not working
- Trying to show WordPress category query result as background image
- How risize a thumbnail?
- custom thumbnail image size not working
- Comparison Operators not working for conditional author post thumbnails
- Assign SQL ‘post_thumbnail’ column as featured image
- Default thumb – how to set it
- How to update custom image sizes?
- featured images twenty eleven theme
- the_post_thumbnail not resizing
- Picture inserted in the post not showing in “Gallery”
- featured image is not showing
- How do you code a featured image into an XML as a jpg link, instead of using a data-id number?
- How to change the format of thumbnails into wordpress theme?
- How to calculate the sum of all featured thumbnail height on WordPress?
- How to create thumbnails programmatically?
- Usage of add_image_size (for featured image)
- Featured image: Dynamic image sizes when enlarged with javascript
- Making a ‘featured image’ become the image for a full banner (top of page) image in a blog post?
- Smaller Size for featured images
- Featured image doesn’t appear in Blog index
- Remove Featured Image based on Date
- How to show only 2nd featured img on home/blog
- Echo recent posts each with its own respective featured image
- How to get the URL of a each custom image size of a featured image
- Recent posts show thumbnail
- How to get post thumbnail to be equal to set media size
- Add notice to add image popup
- Mass/Bulk assign featured images to posts
- setting featured image is not working while running script in background, works when running that script from browser
- Featured Images not appearing
- Display featured image as post thumbnail
- How to modify responsive images in post thumbnails
- get_the_post_thumbnail() – Invalid argument supplied for foreach() in /wp-includes/post-thumbnail-template.php on line 64
- Different thumbnail size than actual picture in post
- How to get the featured image inside of a single-.php template?
- Where is the template from the_post_thumbnail()?
- Get Post Thumbnail Outside of Loop
- Theme:Twenty Fourteen, How to remove featured image on single post page for particular category
- Strange image artifact on font-page thumbnail image