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
- How to retrieve all post titles of a specific post type?
- Custom Post Type Archive Page not showing
- Parent child relationship in custom post type
- How to add “supports” parameter for a Custom Post Type?
- How to show all posts of the category in wordpress?
- Media library – Limit images to custom post type
- Remove current_page_parent nav class from blog index when in CPT
- Prevent trash/delete action on specific post types
- How To Limit Hierarchical Pages Depth (For Custom Post Types) To Children Only
- How to remove “featured image” functionality from a custom post type?
- How do I add a new custom post format?
- Using /%postname% for a custom post type
- How to use custom database tables for custom post types?
- WordPress keeps fetching the archive page instead of the template page
- Custom post type taxonomies URL rewrite
- Linking between custom post types as if they where taxonomies?
- Show custom post type endpoint in REST API just if user has capability
- How to achieve this permalink -> category-name/custom-post-type-name/post-name
- wp_list_pages not showing cpt as I expected
- List posts from Custom Post type with hierarchy?
- Create user role restricted to specific CPT
- Prepend meta_value to permalink of post
- Search Custom Post Type with all meta attached?
- How Can the Users Make a “Playlist” of Posts?
- Glossary with Custom Post Type
- Best Way to Leverage Custom Post Type Related Content and Consider SEO
- How to properly prefix blog post URL’s
- Automatically assign a custom post to a custom taxonomy based on custom field value
- Exclude Custom Post Type & Pages From Auto-Tag Function
- Displaying custom post type on category pages but not on blog listings
- How do I check if a posts status is set to draft or pending?
- How to stop subdirectory wordpress install adding head elemets to entire site?
- How to add post_author column to custom post type
- Custom post type within a subdirectory
- Listing taxonomies from custom post type
- Rendering Custom Post Types independently of the theme in use
- How can I list all custom post types in a block
- Sort by two dates. Default entry date and custom field if present
- Querying CPT with Two Taxonomies
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- Share parent path between Custom Post Types and Pages?
- Issue to get wp_get_attachment_image with cmb2
- Apply post formats to a specific post type only?
- Getting a thumbnail for an external video as the thumbnail for a custom post type?
- How to: CRUD for custom post types in the front end?
- Loading all files within a directory
- Adding multiple WYSIWYG editors to custom post type
- Made Custom Post Types, but single.php not working
- Change or update WordPress loop based on dropdown selection
- How does one customize the table of listings for a custom post type?
- Add a tag to a custom post type
- Remove custom post type slug
- How do I get Link for Oldest Custom Post Type (dynamically)
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- Archives for Custom Post Types (without Pages)
- I have 2 post types i need to show the post type contents in 2 select boxes [closed]
- How to: Display ACF [fields] on Custom Post Types Utilising WordPress ‘Hooks’? [closed]
- Shortcode for display posts in wp-editor
- Insert post metadata for all posts in CPT at once if metadata no existent
- How to alter WP-JSON main query or best practise for custom endpoints
- Previous/Next Link by Meta Value in CPT
- Restrict custom post type from appearing with ?post_types=
- Is there a way to have custom post type and page with the same slug?
- Admin Pointers on a custom post type
- Illegal offset type in get_post_type_object()?
- Shortcode not working with post counter
- URL rewriting for CTP assigned entity
- WordPress posts page for customer filtering and sorting along with category filter
- Admin Custom Meta Box – Pull Last 5 Posts from Custom Post Type
- Added Custom Post Type and the View Option Doesn’t Work
- Post format alternative?
- Comments not working (error not allowed) on posts with custom post status
- Using wp_insert_post to create custom posts with ACF image field
- What would be the optimal CPT / Taxonomy design for the following entities structure