Support » Plugins » Hacks » Meta tag with featured image's url?

  • I’m trying to put a meta tag in my header that will pull the featured image’s url from a post.

    Why can’t I get this to work? Here’s my code:

    <meta name="my_meta" content="<?php wp_get_attachment_url();?>"/>

    I’ve tried all kinds of things but I’m still pretty noobish here. For instance,

    <meta name="twitter:image" content="<?php get_permalink();?>"/>

    works just fine as far as the formatting and syntax goes. How can I stick the featured image’s URL in there instead?


Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Meta tag with featured image's url?’ is closed to new replies.