Title: Error inserting shortcode in page template
Last modified: August 21, 2016

---

# Error inserting shortcode in page template

 *  Resolved [mgali002](https://wordpress.org/support/users/mgali002/)
 * (@mgali002)
 * [13 years ago](https://wordpress.org/support/topic/error-inserting-shortcode-in-page-template/)
 * When I insert the shortcode in php
 * <? php echo do_shortcode (‘[gallery link = "file" template = "simple"]‘);?>
 * on a page-template I have this error:
 * [http://imageshack.us/a/img692/241/errorpagetemplate.jpg](http://imageshack.us/a/img692/241/errorpagetemplate.jpg)
 * Is it possible to fix?
 * thanks
 * [http://wordpress.org/extend/plugins/file-gallery/](http://wordpress.org/extend/plugins/file-gallery/)

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

 *  Plugin Author [Aesqe](https://wordpress.org/support/users/aesqe/)
 * (@aesqe)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/error-inserting-shortcode-in-page-template/#post-3837001)
 * [@mgali002](https://wordpress.org/support/users/mgali002/): that’s because the
   javascript and css files for the “simple” template didn’t load. You can add them
   manually, just paste the following code at the top of your page template, before
   get_header:
 *     ```
       <?php
       wp_enqueue_style('file_gallery_simple', FILE_GALLERY_URL . '/templates/simple/gallery.css');
       wp_enqueue_script('file_gallery_simple', FILE_GALLERY_URL . '/templates/simple/gallery.js', '', '', true);
       ?>
       ```
   
 * that should work.
 *  Thread Starter [mgali002](https://wordpress.org/support/users/mgali002/)
 * (@mgali002)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/error-inserting-shortcode-in-page-template/#post-3837002)
 * ok Aesqe,
 * thanks a lot!!!! 🙂
 *  [gauriR](https://wordpress.org/support/users/gaurir/)
 * (@gaurir)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/error-inserting-shortcode-in-page-template/#post-3837017)
 * When I insert the shortcode in php
 * <? php echo do_shortcode (‘[gallery link = "file" template = "simple"]‘);?>
 * i get blank page i have put before get_header:
    <?php wp_enqueue_style(‘file_gallery_simple’,
   FILE_GALLERY_URL . ‘/templates/simple/gallery.css’); wp_enqueue_script(‘file_gallery_simple’,
   FILE_GALLERY_URL . ‘/templates/simple/gallery.js’, ”, ”, true); ?> but still 
   get blank page display, PLEASE HELP ME
 *  Plugin Author [Aesqe](https://wordpress.org/support/users/aesqe/)
 * (@aesqe)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/error-inserting-shortcode-in-page-template/#post-3837018)
 * [@gaurir](https://wordpress.org/support/users/gaurir/): is that blank space between
   the “?” and “php” in your first code example also present in your file?
 * `<? php` should be `<?php`

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

The topic ‘Error inserting shortcode in page template’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/file-gallery_fdfbfb.svg)
 * [File Gallery](https://wordpress.org/plugins/file-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/file-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/file-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/file-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/file-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/file-gallery/reviews/)

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 4 replies
 * 3 participants
 * Last reply from: [Aesqe](https://wordpress.org/support/users/aesqe/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/error-inserting-shortcode-in-page-template/#post-3837018)
 * Status: resolved