WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Shortcode string returned literally--not executed (5 posts)

  1. ixwa
    Member
    Posted 3 years ago #

    I've never had a use for shortcodes until now so I have to be missing something bleedingly obvious.

    Using a nextgen gallery shortcode in a page like [ album id=1 template=compact ] simply returns the literal string "[ album id=1 template=compact ]". Same thing if I invoke it with PHP:

    <?php echo do_shortcode('[ album id=1 template=compact ]'); ?>.

    I get "[ album id=1 template=compact ]".

    Am I missing something??

  2. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    Try taking the space out from in between [ and album?

  3. ixwa
    Member
    Posted 3 years ago #

    ***WOW***

    Well firstly, thanks for the GREAT CATCH. This example was copied directly from the nextgen website...amazing huh?

    I guess that's what you get for a freebie CMS plugin...

    Thanks again.

  4. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    I assume the example code was written as such, in order not to have the shortcode parsed.

  5. ixwa
    Member
    Posted 3 years ago #

    I thought that's what escape characters are for--particularly for a website documenting examples/usage of tags! (Otherwise how on earth else would a new user know that the format was incorrect?? Bizarre.)

Topic Closed

This topic has been closed to new replies.

About this Topic