WordPress.org

Support

Support » Plugins and Hacks » [Resolved] php shortcode (do_shortcode)

[Resolved] php shortcode (do_shortcode)

  • Hi,
    firstly congratulation for the plugin. I have just download it and expect a lot from it.

    I would like to insert a shortcode in a template page, with the wordpress function:
    <?php echo do_shortcode( $content ) ?>

    for example:
    <?php echo do_shortcode("[nggtags_ext gallery="dog,cat" template=download]") ?>

    but doesn’t work, (the entire page doesn’t compile).

    I use this php technique with theme Custom Community and other plugins like NGGallery and works perfectly…

    How can we fix it?

    http://wordpress.org/plugins/nextgen-download-gallery/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Ok, I found the error, it was typographical…

    It have to use simple quotes, instead double:
    <?php echo do_shortcode([nggtags_ext gallery=”dog,cat” template=download]) ?>

    and not:
    <?php echo do_shortcode([nggtags_ext gallery=”dog,cat” template=download]) ?>

    I understand that the admin delete this topic, because it has nothing to do with the plugin

    Plugin Author webaware

    @webaware

    G’day sandrogg,

    Glad to hear you found the problem. Be aware that NextGEN Gallery 2.0 has broken this shortcode, and has also broken albums based on tags. I advise you not to update to NextGEN Gallery 2.0 for a while until both Photocrati have fixed their legacy support and I’ve fixed my support for their new version.

    cheers,
    Ross

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] php shortcode (do_shortcode)’ is closed to new replies.