Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




has_post_thumbnail [ WordPress Function ]

has_post_thumbnail ( $post_id = null )
Parameters:
  • (int) $post_id Optional. Post ID.
Returns:
  • (bool) Whether post has an image attached.
Defined at:



Check if post has an image attached.

Source


<?php
function has_post_thumbnail$post_id null ) {
    return (bool) 
get_post_thumbnail_id$post_id );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics