Use get_the_ID()
, the post object is not set up completely on wp_head()
:
if ( is_singular() )
$post = get_post( get_the_ID() );
Use get_the_ID()
, the post object is not set up completely on wp_head()
:
if ( is_singular() )
$post = get_post( get_the_ID() );