wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



the_post_thumbnail_url › WordPress Function

Seit4.4.0
Veraltetn/v
the_post_thumbnail_url ( $size = 'post-thumbnail' )
Parameter:
  • (string|int[]) $size Optional. Image size to use. Accepts any valid image size, or an array of width and height values in pixels (in that order). Default 'post-thumbnail'.
    Erforderlich: Nein
    Standard: 'post-thumbnail'
Definiert in:
Codex:

Displays the post thumbnail URL.



Quellcode

function the_post_thumbnail_url( $size = 'post-thumbnail' ) {
	$url = get_the_post_thumbnail_url( null, $size );

	if ( $url ) {
		echo esc_url( $url );
	}
}