Home › Forums › CSS › Get the URL from the image I inserted in the HTML Editor. › Re: Get the URL from the image I inserted in the HTML Editor.
August 20, 2012 at 10:02 pm
#108234
Participant
I believe I have solved this. Not exactly sure if it will work overall since I only tested on one page. Perhaps more advanced WP developers can chime in.
Here is the following code:
if( function_exists( 'attachments_get_attachments' ) )
{
$attachments = attachments_get_attachments();
$total_attachments = count( $attachments );
if( $total_attachments ) : ?>
Process:
if ( has_post_thumbnail()) {
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full');
echo '- ';
echo '1';
}
?>
- ">