• I am editing a page via Code view. The Exec-php plugin allows me to write php via the editor. My problem:

    The shortcode [nggallery id=1 template=v6b] doesn’t get replaced like it should when I call <?php the_content(); ?> later in the page within a get_posts query loop. However, the shortcode works fine if I use <?php echo get_the_content(); ?> in the loop instead.

    Am I missing some fundamental WP principle as to why the first function breaks NGG and the second works fine?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Matija Erceg

    (@matijaerceg)

    Update: the_advanced_excerpt() also prevents the shortcode from working

    Sounds like the same problem I have and posted about here. Unfortunately my problem never was solved (and still persists) 🙁

    Is the <?php echo get_the_content(); ?> workaround a usable solution or does it have disadvantages?

    EDIT: Just tried <?php echo get_the_content(); ?>, but it doesn’t work for me. The shortcode doesn’t get replaced 🙁

    Thread Starter Matija Erceg

    (@matijaerceg)

    Try this

    I think that’s what worked for me.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: NextGEN Gallery] Shortcode breaks when I use the_content();’ is closed to new replies.