I would like to add open graph meta tags to my header.php, but can someone explain how this works if header.php comes before my loop with the relevant information??
<meta property="og:title" content="The Rock"/>
<meta property="og:type" content="movie"/>
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
<meta property="og:site_name" content="IMDb"/>
<meta property="fb:admins" content="USER_ID"/>
<meta property="og:description"
content="A group of U.S. Marines, under command of
a renegade general, take over Alcatraz and
threaten San Francisco Bay with biological
weapons."/>
For example:
<meta property="og:description" content="<?php the_content(); >?"/>
Won’t work because the header.php file comes before the Loop…any advice?
I have this class from a while ago which still works fine on posts and pages using
admin_head
action hook