Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

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.

#108234
chrisburton
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
    ';
    }
    ?>

  • ">