Title: do shortcode troubles
Last modified: August 20, 2016

---

# do shortcode troubles

 *  [battica](https://wordpress.org/support/users/battica/)
 * (@battica)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/do-shortcode-troubles/)
 * Hi there!
 * I am having trouble with the “Flipping Book” plugin – [http://wordpress.org/extend/plugins/page-flip-image-gallery/](http://wordpress.org/extend/plugins/page-flip-image-gallery/)
 * I am trying to use a shortcode to add the Flash page flip book to my site, and
   have added this into one of the theme files. I have tried both of the following:
 * <?php do_shortcode(‘[book id=’1′ /]’); ?>
    and <?php echo do_shortcode(‘[book
   id=’1′ /]’); ?>
 * but in both cases, I get the following error:
    Parse error: syntax error, unexpected
   T_LNUMBER in /home/thecook2/public_html/newsite/wp-content/themes/DeepFocus/home.
   php on line 13
 * I have no idea what is causing this. When I add [book id=’1′ /] to a page, it
   works correctly. But the shortcode doesn’t work. 🙁
    Please help!

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/do-shortcode-troubles/#post-2996861)
 * probably caused by the use of single quotes in the code;
 * try for instance:
 *     ```
       <?php echo do_shortcode("[book id='1' /]"); ?>
       ```
   
 *  Thread Starter [battica](https://wordpress.org/support/users/battica/)
 * (@battica)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/do-shortcode-troubles/#post-2997001)
 * Thanks alchymyth. That made the syntax error go away, but the Flash flip book
   is not showing on the site yet. 🙁
 * When I use the shortcode on a page or post, it shows. But it still isn’t showing
   from within the theme page, using the code as above.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/do-shortcode-troubles/#post-2997013)
 * the code is possibly not _**real **_shortcode;
 * alternatively, try:
 * `<?php echo apply_filters('the_content',"[book id='1' /]"); ?>`
 *  Thread Starter [battica](https://wordpress.org/support/users/battica/)
 * (@battica)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/do-shortcode-troubles/#post-2997048)
 * Perfect!! That works!! Thanks so much! 😀

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

The topic ‘do shortcode troubles’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [battica](https://wordpress.org/support/users/battica/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/do-shortcode-troubles/#post-2997048)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
