Title: idonic's Replies | WordPress.org

---

# idonic

  [  ](https://wordpress.org/support/users/idonic/)

 *   [Profile](https://wordpress.org/support/users/idonic/)
 *   [Topics Started](https://wordpress.org/support/users/idonic/topics/)
 *   [Replies Created](https://wordpress.org/support/users/idonic/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/idonic/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/idonic/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/idonic/engagements/)
 *   [Favorites](https://wordpress.org/support/users/idonic/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[wp-mpdf] [Plugin : wp-mpdf] Add featured image and user avatar to pdf](https://wordpress.org/support/topic/plugin-wp-mpdf-add-featured-image-and-user-avatar-to-pdf/)
 *  Thread Starter [idonic](https://wordpress.org/support/users/idonic/)
 * (@idonic)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-mpdf-add-featured-image-and-user-avatar-to-pdf/#post-2424788)
 * You should place that in the pdf template you create.
 * By default, template location is wp-content/wp-mpdf-themes/default.php.
 * To costumize your pdf’s just create a copy of default.php (let’s say default_2.
   php), and edit it according to your needs.
 * You are also required to make a copy of the default.css file in order to edit
   the styles of your template. (you have to name them the same: default_2.php and
   default_2.css)
 * On the default.php file you’ll notice a page structure which then you can costumize
   according to your needs. And that is where you’ll use that piece of code to call
   forth the thumbnail’s featured image.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Most Popular] [Plugin: WP Most Popular] custom post type](https://wordpress.org/support/topic/plugin-wp-most-popular-custom-post-type/)
 *  [idonic](https://wordpress.org/support/users/idonic/)
 * (@idonic)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-most-popular-custom-post-type/#post-2599671)
 * As a temporary fix, while the plugin author doesn’t solve this, i managed to 
   make it work with custom post types.
 * On wp-most-popular/system/helpers.php simply change line 7 from:
 * `$post_type = 'post';`
 * to
 * `$post_type = 'my_custom_post_type_name';`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[wp-mpdf] [Plugin : wp-mpdf] Add featured image and user avatar to pdf](https://wordpress.org/support/topic/plugin-wp-mpdf-add-featured-image-and-user-avatar-to-pdf/)
 *  Thread Starter [idonic](https://wordpress.org/support/users/idonic/)
 * (@idonic)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-mpdf-add-featured-image-and-user-avatar-to-pdf/#post-2424786)
 * To place a featured post image on the pdf file i’m using
    `get_the_post_thumbnail(
   $post->ID, medium)`
 * Does that solve your issue?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[wp-mpdf] [Plugin : wp-mpdf] Add featured image and user avatar to pdf](https://wordpress.org/support/topic/plugin-wp-mpdf-add-featured-image-and-user-avatar-to-pdf/)
 *  Thread Starter [idonic](https://wordpress.org/support/users/idonic/)
 * (@idonic)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-mpdf-add-featured-image-and-user-avatar-to-pdf/#post-2424513)
 * Got it!
 * `. get_avatar( wp_get_current_user('user_email', $id), '252')`
 * I was waaaayy off on this one. 🙂 Now it dynamically loads the current user’s
   avatar on the pdf.
 * Thanks again for your help.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[wp-mpdf] [Plugin : wp-mpdf] Add featured image and user avatar to pdf](https://wordpress.org/support/topic/plugin-wp-mpdf-add-featured-image-and-user-avatar-to-pdf/)
 *  Thread Starter [idonic](https://wordpress.org/support/users/idonic/)
 * (@idonic)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-mpdf-add-featured-image-and-user-avatar-to-pdf/#post-2424500)
 * Thanks for your reply!
 * The css part is going ok but the php one doesn’t..
 * I’m currently using the line below to dynamically load the current user’s avatar
   into the homepage header:
 * `<?php global $current_user; $current_user = wp_get_current_user(); _e(get_avatar(
   $current_user)); ?>`
 * I was trying to get the same functionality to work with your plugin; it already
   displays the general avatar on the pdf but i can’t get it to make a distinction
   between users.. 🙁
 * So far i’ve added these two lines to get the output mentioned:
 * (top)
    `global $current_user;`
 * `<h1>' . $pdf_output .= (get_avatar('$avatar')) . '</h1>`
 * (yes, i’m really new to this “php stuff” :))
    Can you point me out on the right
   direction?
 * Thanks again

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