Title: [Plugin: Document Gallery] Include in template
Last modified: August 20, 2016

---

# [Plugin: Document Gallery] Include in template

 *  Resolved [gojak](https://wordpress.org/support/users/gojak/)
 * (@gojak)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-document-gallery-include-in-template/)
 * HI,
    is it possible to include this into theme page so if a page has attached
   documents it will automatically display docs? This way I can have pre-prepared
   theme. Something like:
 * `<?php if (function_exists('document gallery')) echo ('get_attachment_icons');?
   >`
 * Thanks
 * [http://wordpress.org/extend/plugins/document-gallery/](http://wordpress.org/extend/plugins/document-gallery/)

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

 *  Thread Starter [gojak](https://wordpress.org/support/users/gojak/)
 * (@gojak)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-document-gallery-include-in-template/#post-3044738)
 * Or perhaps to add it in widgets, that would be cool since than it would automatically
   be listed if a page has attachments… simmilar to Document Attachment Widget.
   
   Thanks
 *  Thread Starter [gojak](https://wordpress.org/support/users/gojak/)
 * (@gojak)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-document-gallery-include-in-template/#post-3044998)
 * My mistake. For including in template:
 *     ```
       <div class="inheritssomeclass">
       <?php echo do_shortcode('[document gallery]'); ?>
       </div>
       ```
   
 *  Plugin Author [Dan Rossiter](https://wordpress.org/support/users/danrossiter/)
 * (@danrossiter)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-document-gallery-include-in-template/#post-3045068)
 * [@gojak](https://wordpress.org/support/users/gojak/): Thanks for the comment!
   It sounds like you found a solution for your own question so I’m going to mark
   this as resolved, but do let me know if you have any other questions.
 *  Thread Starter [gojak](https://wordpress.org/support/users/gojak/)
 * (@gojak)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-document-gallery-include-in-template/#post-3045069)
 * Thank you, no more questions. 🙂
 * All the best!

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

The topic ‘[Plugin: Document Gallery] Include in template’ is closed to new replies.

 * ![](https://ps.w.org/document-gallery/assets/icon.svg?rev=983329)
 * [Document Gallery](https://wordpress.org/plugins/document-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/document-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/document-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/document-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/document-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/document-gallery/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [gojak](https://wordpress.org/support/users/gojak/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-document-gallery-include-in-template/#post-3045069)
 * Status: resolved