There is a the_post
hook which should let you modify the post object:
function my_the_post_action( $post_object ) {
// modify post object here
}
add_action( 'the_post', 'my_the_post_action' );
But the post data isn’t where your thumbnails are stored. They are associated via a post meta field. That is what you are going to have to manipulate. Something like:
function my_thumbs($n, $object_id, $meta_key, $single ) {
if ('_thumbnail_id' == $meta_key) {
echo 'image link';
}
}
add_filter( "get_post_metadata", 'my_thumbs', 10, 4 );
Though I have no idea how complex that function would need to be.
Honestly, if you are running WP 2-something you need to update and spend the time converting your improvised system to Core functions. Sincerely.
Related Posts:
- Custom excerpt length filter doesn’t work
- How to generate numbers indistinguishable for the IDs of the posts
- Hook for changing excerpt content when excerpt not set
- Filter question list on substring of metavalue
- How enter custom post meta or custom field on box post list archive page?
- How to add category to: ‘wp-admin/post-new.php’?
- Custom Field in Featured image for A particular post
- media_handle_upload for local files?
- Modify ‘Read more’ link adding a new class
- How to publish a post with empty title and empty content?
- Delete duplicated wp_postmeta record
- How to add a “publish” link to the quick actions
- Change slug with custom field
- How do I use element instead of tags in WordPress post content having webP support?
- Why is wordpress removing some unicode characters (e.g. some emojis) when I save my post?
- VT-resize image and display it [duplicate]
- Better post meta efficiency?
- Posts Page Featured Image [closed]
- Human Time Diff, change mins to minutes
- How do I programmatically add an image to a post?
- Exporting Data from WordPress into a flat table
- Adding Multiple Values to a Post Meta Key
- Using radio button meta data from a custom meta box
- How to link up “read more” on excerpts hack from WP Recipies
- Allowing the SoundCloud player to appear in a post excerpt
- Getting post id from wp_insert_post_data function?
- How can i do something after head like adding a hook for after head but before post
- Checking if a post with certain meta value exists
- Amend wordpress password function
- How do I find which articles are missing a featured image in The WordPress database?
- Save re-arranged draggable post items to wordpress database
- Change post_date to post_modified date on post template?
- Can’t check if a post has thumbnail adding filter to get_post_metadata()
- Change post order random through out the entire WordPress
- use wpml_post_language_details function other plugin based on $post->ID [closed]
- Default to ‘all’ view on the ‘edit-post’ screen for authors
- Custom Posts Query and meta_query Sort Order
- How do I display some posts fully on the homepage, and some as an excerpt only?
- Calling Different Custom Post Timestamps in a table
- How to allow visitors to filter posts by multiple taxonomies
- Saving custom fields to a custom taxonomy
- Get Post’s first image using Short-code
- Change all author links in Blog roll
- How to I retrieve the ID from the Posts page?
- Is it possible to filter the main loop to exclude posts from a specific category?
- Is there any way to tell when wp_postmeta has been updated?
- Admin – no Featured image choice in create new/page|post
- Post Image not displaying in category view
- Modify posts listing at back end
- Display post number by category
- How to display post title inside thumbnail?
- How include css class based on post ( in loop ) slug?
- Restrict displaying posts to the poster itself (in Back-end)
- Show number of posts by logged in user
- How does WP decide how to display a page
- Exists filter or action that change Add New Post link?
- When sending a newsletter -not with wordpress- the server has 100% cpu [closed]
- Insert data from custom created PHP page into wp_postmeta table
- content summary of a post disappears If an images added at the beginning of the post. how to solve it?
- saving/reading custom field value does not work – no value gets POSTed
- Only show featured image on exerpt and exclude images in post
- changing parent_id on post
- WordPress Excerpt Paragraph Limiting
- Grab value of excerpt_length
- can’t modify post title using the_posts filter
- How to add text before post_excerpt in Gutenberg
- Using AJAX to filter posts without refreshing page
- Select another post in a post meta like a parent page is selected while editing a page
- Dropdown Select Post Filter
- Blogposting Schema & Structured Data without plugin
- Display images of related posts
- Add postmeta to all blog posts
- Enable HTML Tags in WordPress Post excerpt
- show only one category and filter by tag
- Prevent WordPress from putting around specific element
- filter buddypress users posts by user ‘xprofile’ custom fields
- How to display post excerpt beside post list inside Post of Dashboard
- Grab meta data before post is saved
- How to fetch posts that are stored in the different table than the default table (wp_posts)?
- Printable Page with all Posts from Tag
- Hide Admin posts & pages in Dashboard
- Get the correct meta_value with get_post_meta
- How to get the postID inside ‘content_save_pre’? Other hook?
- Get results from the main wp_query
- Post List Widget with custom posts and editing the Read More Link
- Keep post format class with isotope filter
- Add a minimum word count to Excerpt (and how to force Excerpt as a rule for WyPiekacz)
- How to use in_category?
- Insert link to my thumbnail images
- thumbnail image path and file path for gallery thumbnail images
- Post thumbnail is not shown in wp-admin
- How to show only the date, the title and a little “summary” of my WordPress post in my custom theme?
- Displaying warning if no featured image has been set – Post Editor
- WP_query sort by custom meta_key “price”
- excerpt in template for specific page
- Show full post only to loged-in users
- Add custom PHP (no-SQL) filter to WP_query
- What effect can a large wp_post table have on overall site performance?
- Read more opens attachment
- How to make internal links creating plugin to respect ACF?