Title: Shortcode in template
Last modified: August 21, 2016

---

# Shortcode in template

 *  Resolved [groloff](https://wordpress.org/support/users/groloff/)
 * (@groloff)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-template-4/)
 * Hi there. Is it possible to invoque the shortcode from a template php file using
   the do_shortcode wordpress function?
    I´m using this code: echo do_shortcode(‘[
   fileaway type=”list” base=”1″]’); but it doesn´t work Any ideas? Thanks a lot
 * [https://wordpress.org/plugins/file-away/](https://wordpress.org/plugins/file-away/)

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

 *  Plugin Author [thomstark](https://wordpress.org/support/users/thomstark/)
 * (@thomstark)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-template-4/#post-4849294)
 * Have you tried adding debug=on to your shortcode to make sure it’s pointing to
   a valid directory? Nothing will be output if there are no files.
 *  Plugin Author [thomstark](https://wordpress.org/support/users/thomstark/)
 * (@thomstark)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-template-4/#post-4849421)
 * Get it working? I’ve never had a problem with do_shortcode in a template. You
   can, of course, just call the function, and pass the attributes array to its 
   argument, like this:
 *     ```
       $atts = array('type'=>'list','base'=>'1');
       echo sssc_fileaway($atts);
       ```
   
 * But of course if those are your actual choices, they’re the defaults, so you 
   could just call the function: `echo sssc_fileaway();`
 *  Plugin Author [thomstark](https://wordpress.org/support/users/thomstark/)
 * (@thomstark)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-template-4/#post-4849522)
 * Ever get this figured out or do we still need to troubleshoot?
 *  Thread Starter [groloff](https://wordpress.org/support/users/groloff/)
 * (@groloff)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-template-4/#post-4849525)
 * sorry thomstark. in the end I didn’t had to use a template shortcode. but no,
   i couldn’t get it to work. thanks anyway
 *  Plugin Author [thomstark](https://wordpress.org/support/users/thomstark/)
 * (@thomstark)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-template-4/#post-4849526)
 * I’ll look into this further as soon as I can.
 *  Thread Starter [groloff](https://wordpress.org/support/users/groloff/)
 * (@groloff)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-template-4/#post-4849527)
 * what i was trying to do was showing a list of the last 5 files uploaded trough
   FTP client to several subfolders of the base folder of fileaway. is this possible
   to do with file away?
 *  Plugin Author [thomstark](https://wordpress.org/support/users/thomstark/)
 * (@thomstark)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-template-4/#post-4849529)
 * It doesn’t filter by anything like most recent, but it can recurse into subdirectories
   with recursive turned on.

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

The topic ‘Shortcode in 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/)

 * 7 replies
 * 2 participants
 * Last reply from: [thomstark](https://wordpress.org/support/users/thomstark/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-template-4/#post-4849529)
 * Status: resolved