Skip to content

Instantly share code, notes, and snippets.

@aisin
Created July 16, 2014 03:36
Show Gist options
  • Save aisin/6710ca34376f45d3d334 to your computer and use it in GitHub Desktop.
Save aisin/6710ca34376f45d3d334 to your computer and use it in GitHub Desktop.
WordPress getting post thumbnail URL
<?php
$domsxe = simplexml_load_string(get_the_post_thumbnail());
$thumbnailsrc = $domsxe->attributes()->src;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment