Multiple Post Thumbnails
[resolved] Get plain text src attribute using MultiplePostThumbnails? (3 posts)

  1. zackperdue
    Posted 4 years ago #

    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,


  2. Alex
    Posted 4 years ago #

    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);
    	}  ?>
  3. zackperdue
    Posted 4 years ago #

    Thanks for responding,

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


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Multiple Post Thumbnails
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic