Try this (untested):
<?php
$prevPost = get_previous_post();
foreach ($prevPost as $postPrev) {
if ( has_post_thumbnail($postPrev->ID)) {
$prevThumbnail = get_the_post_thumbnail($postPrev->ID, array(150,150) );
previous_post_link( '%link', $prevThumbnail );
}
}
?>
Related Posts:
- Can the Next/Prev Post links be ordered by menu order or by a meta key?
- Filter next_post_link() and previous_post_link() by meta_key?
- How can I get next/ previous post links to order by a filter (by the last word of the title)?
- How can I get next post id after current post id for custom post type
- Problem excluding category from get_next_post
- specify meta_key / meta_value condition for prev_post_link and next_post_link
- Using previous_post_link and next_post_link to wrap around post sequence
- Working with Next and Prev links in Single Taxonomy Templates
- Make `previous_post_link()` Function Show The Post After Next i.e. Jump A Post
- next_post_link and previous_post_link in custom post type single page, in same non-custom category
- Next and Previous Posts of Same Parent
- Modify previous and next post links to current Authors Other posts
- Why are previous_post_link/next_post_link skipping some posts?
- Add Previous/Next Buttons to CPT Single Pages Only
- How to use next_posts_link/previous_posts_link for custom post types paginate?
- Custom Posts and Posts – next_post_link and previous_post_link not working together
- Display next 3 posts based on custom taxonomy
- Include “Scheduled” (“Future”) Posts in WordPress Post Navigation ( previous_post_link, next_post_link ) for a Specific Custom Post Type
- How to get next post link of child custom post type from parent post and get next post link of parent post from the last child post?
- Prev/Next Navigation on Single Post Disappeared for Custom Post Type
- Back, Next, and Previous links for the REFERRING term archive
- get_previous_post_link and get_next_post_link of custom post type that share custom field value
- Previous/Next custom post links within custom taxonomy
- Next/Previous Post Links in single-[custom-post-type].php file
- show previous/next post orderer by title in custom post types
- previous_posts_link returns null when querying custom post type
- Adding custom post type archives to a WordPress menu
- Custom post type save_post action not firing
- Redirect after deleting post and keep track of pagination
- Custom Post Type archive as front page
- How to auto send email when publishing a custom post type?
- Dynamic page.php template for custom post types
- Permalinks in Custom Post types
- how to create my own edit.php admin page code or template for my custom post type
- Custom Post Type with Nested Taxonomy and Template Files
- Disable WordPress Recognizing Path as Attachment
- Rest Api v2 orderby meta_key in custom post type
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- Display Custom Post Type in Recent Posts
- How to allow “Add New” capability of CPT when links to its UI are placed as a submenu?
- Parent / Child formatting in a list of post of a custom post type
- When ‘is_post_type_archive()’ return true?
- How to check if “is single” page
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- Custom Taxonomy URL are redirecting to page with the same name
- Get posts from a custom post type by child categories of a parent category
- Want to Add Custom Fields for Uploading video to WordPress Users from front end
- Custom Posts Types as Custom Fields
- Hierarchical Custom Post Types in Array
- Making certain categories of CPT not publicly queryable
- WordPress Custom Post Type Navigation + Children
- custom post type and hidden url : what is the cleanest way to build CPT with custom page template?
- page menu entry for custom post type
- Exclude objects from WordPress API based from ACF field using rest_prepare_{$post_type}
- Custom taxonomies relationship
- How to remove post listing page for a custom post type
- How to include term custom meta into the custom taxonomy term permalink structure
- Setup template_redirect using has_term when NO term assigned
- search suggest – filter post type
- Custom Taxonomy not being saved on custom posttype
- Different Ways to Query Custom Post Types?
- Addin plugin custom post type to members plugin
- Custom Post Type Slick Slider “$ is not a function”
- Get parent category id from child category page for custom taxonomy
- Trying to get custom post of a custom taxonomy
- Remove custom permalink structure from custom post type without modifying register_post_type() directly
- Change Slug of a Custom Post Type
- How can I create an automatic drop down menu with my tags?
- show current item in custom menu, when inside a custom post type
- sort CPT on Custom Taxonomy Archive page
- Programmatically add custom field to post_name in a custom post type
- Best way to change the blog page post type?
- Multiple wp_editor instances in custom post type using Ajax
- Different categories for custom post type
- Safe to throw 404 error in request filter?
- Get single posts archive information
- Adding a Custom Field to be used by Posts 2 Posts
- Show the categories the current post has
- order the meta query results by 2 custom fields
- 404 error rewrite permalinks
- Pagination not working in custom post type. Help
- wp_insert_post from XML feed only inserting first post
- Does this archive template part look like its making too many calls to the db?
- Limiting the Number of User Posts to Their Own Posts
- Dont know why my custom post type not add_post_meta
- Problem with multi checkboxes value in metabox?
- Post Query , breaks layout if a post is deleted
- How to redirect from parent page to its child page?
- Apply pre_get_posts to specific custom post type in the admin area
- Not able to get my custom search result using meta_query and tax_query together?
- Page Template For Custom Post Type doesn’t work on URL containing CPT name, other URL’s work
- Generating a radius search on postmeta-metavalue and adding a taxonomy to query
- WordPress Author Posts Review After Every Change In The Same WordPress Post
- Custom Post Type meta oembed html output resulting in WSoD
- Customized featured image doesn’t refresh in post admin metabox after upload/insert
- Custom Post Type Template based on Taxonomy
- Remove Permanent URL for custom post types
- How do I hide single category post on my post page
- Links in archive not including taxonomy parameter
- Get permalink in custom post type loop doesn’t work