Make WordPress Core

#60661 closed feature request (worksforme)

add_filter get_post_thumbnail_url is this still open or closed

Reported by: pumba101's profile pumba101 Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.4.3
Component: General Keywords: needs-patch
Focuses: Cc:

Description

I have a website I am working on that requires me to change the featured image returned for custom post_type and I wish I could have a function that Hook into the returned thumbnail_url and point to another url of a custom image.

I saw this issue was raised but I don't see the solution. Anyone can help?

Change History (1)

#1 @joemcgill
14 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Hi @pumba101, get_the_post_thumbnail_url() already includes a filter that can be used for this purpose. See: https://developer.wordpress.org/reference/functions/get_the_post_thumbnail_url/ for more details.

If you need additional help, please visit https://wordpress.org/support/forums/ as Trac is used primarily for core development, and not for support.

Note: See TracTickets for help on using tickets.