• Hi there!

    I am having trouble with the “Flipping Book” plugin – http://ww.wp.xz.cn/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)
  • probably caused by the use of single quotes in the code;

    try for instance:

    <?php echo do_shortcode("[book id='1' /]"); ?>
    Thread Starter battica

    (@battica)

    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.

    the code is possibly not real shortcode;

    alternatively, try:

    <?php echo apply_filters('the_content',"[book id='1' /]"); ?>

    Thread Starter battica

    (@battica)

    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.