Title: Main image php code
Last modified: July 11, 2017

---

# Main image php code

 *  Resolved [andrea302](https://wordpress.org/support/users/andrea302/)
 * (@andrea302)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/main-image-php-code/)
 * What is the php code for the main (featured) image

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [odude](https://wordpress.org/support/users/odude/)
 * (@odude)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/main-image-php-code/#post-9312658)
 * Featured image is called primary image at UPG.
 * To display image at personal layout below pho code can be used.
 * “>
 *  Plugin Author [odude](https://wordpress.org/support/users/odude/)
 * (@odude)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/main-image-php-code/#post-9312671)
 * ” class=”pure-img”>
 * I cannot paste php code here
 * echo $image
    will give you URL of the image which you can enclose inside img 
   tag.
 *  Thread Starter [andrea302](https://wordpress.org/support/users/andrea302/)
 * (@andrea302)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/main-image-php-code/#post-9326776)
 * I have the same problem yet. I try to explain better the problem: I use the plugin“
   Favorites” that shows favorite post list (with thumbnails) of different post 
   type (content post type, a custom post type and UPG post type), but UPG thumbnails
   are the only ones not showed in the list. I don’t think it’s a problem of the
   plugin “favorites” beacuse I made a “page” with the php code and the only ones
   thumbnails not showed are the UPG thumbnails even in this case.
    I hope I was
   clear.
 * Regards
 *  Plugin Author [odude](https://wordpress.org/support/users/odude/)
 * (@odude)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/main-image-php-code/#post-9328159)
 * At UPG plugin the picture attached/uploaded is not treated as featured image 
   as it used to be in wordpress’s post. That’s why it is called primary image and
   it can be displayed only with UPG function.
 * Since there are many live sites running we are now not able to convert it to 
   featured image. As soon as we get better approach for it, we will definitely 
   upgrade it.
 *  Thread Starter [andrea302](https://wordpress.org/support/users/andrea302/)
 * (@andrea302)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/main-image-php-code/#post-9328777)
 * Thank you for your answer, I am hopeful and I look forward to the upgrade.
    Thank
   you for this wonderful plugin!
 * Regards
 *  Plugin Author [odude](https://wordpress.org/support/users/odude/)
 * (@odude)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/main-image-php-code/#post-9339372)
 * The new version 1.18 will have featured icon/logo upload option at admin dashboard.
   
   The image used here also get displayed at archive page as default of theme installed
   and can also be used in other’s plugins.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Main image php code’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-upg_72695c.svg)
 * [User Post Gallery - UPG](https://wordpress.org/plugins/wp-upg/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-upg/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-upg/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-upg/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-upg/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-upg/reviews/)

## Tags

 * [featured image](https://wordpress.org/support/topic-tag/featured-image/)
 * [main image](https://wordpress.org/support/topic-tag/main-image/)
 * [php code](https://wordpress.org/support/topic-tag/php-code/)

 * 6 replies
 * 2 participants
 * Last reply from: [odude](https://wordpress.org/support/users/odude/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/main-image-php-code/#post-9339372)
 * Status: resolved