Title: Adding attachment shortcode to template
Last modified: August 22, 2016

---

# Adding attachment shortcode to template

 *  Resolved [fegul](https://wordpress.org/support/users/fegul/)
 * (@fegul)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/adding-attachment-shortcode-to-template/)
 * I’d like to automatically include the following shortcode into every post/page
   that has attachments:
 * `[attachaway type=”table”]
 * Unfortunately, do_shortcode is not working and I’m not sure how I can automatically
   add this short code to all pages and posts that have attachments.
 * Any suggestions on how to integrate FileAway into themes?
 * [https://wordpress.org/plugins/file-away/](https://wordpress.org/plugins/file-away/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [thomstark](https://wordpress.org/support/users/thomstark/)
 * (@thomstark)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/adding-attachment-shortcode-to-template/#post-5338301)
 * You did echo do_shortcode, right? Can’t leave put the echo.
 * Otherwise…
 * $attachaway = new attachaway;
    $atts = array(‘type’ => ‘table’, ‘flightbox’ =
   > ‘multi’, ‘etcetera’ => ‘etcetera’); echo $attachaway->sc($atts);

Viewing 1 replies (of 1 total)

The topic ‘Adding attachment shortcode to template’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/file-away_e3e2e1.svg)
 * [File Away](https://wordpress.org/plugins/file-away/)
 * [Support Threads](https://wordpress.org/support/plugin/file-away/)
 * [Active Topics](https://wordpress.org/support/plugin/file-away/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/file-away/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/file-away/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [thomstark](https://wordpress.org/support/users/thomstark/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/adding-attachment-shortcode-to-template/#post-5338301)
 * Status: resolved