WordPress.org

Support

Support » Plugins and Hacks » Multiple Post Thumbnails » [Resolved] Get plain text src attribute using MultiplePostThumbnails?

[Resolved] Get plain text src attribute using MultiplePostThumbnails?

  • is there a way i can get the plain src for the image? I would like to use the src for other things instead of output an entire image tag.

    Let me know if this is possible and how.

    Thanks in advance,

    Zack

Viewing 2 replies - 1 through 2 (of 2 total)
  • I was able to get src using the following code (in my case portfolio post type and sull-site thumbnail ID)

    <?php if (class_exists('MultiPostThumbnails') && MultiPostThumbnails::has_post_thumbnail('portfolio', 'full-site')) {
    
    		$sec_img = MultiPostThumbnails::get_post_thumbnail_id('portfolio', 'full-site', $post->ID);
    		echo wp_get_attachment_url($sec_img);
    
    	}  ?>

    Thanks for responding,

    I believe the solution i came up with was pretty close to this.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Get plain text src attribute using MultiplePostThumbnails?’ is closed to new replies.
Skip to toolbar