Optional Content
Does not work with other shorttags as content (4 posts)

  1. MarcKersten
    Posted 5 years ago #

    Other shorttags within Optional Contents "if"-tags will show as plain text instead of computed content. Tried this with Scribd and Imageflow2. Anybody with a solution?

  2. aleskalex
    Posted 5 years ago #

    Still nothing... :(
    it'll be great if we can work it out!

  3. MarcKersten
    Posted 5 years ago #

    I have tested another similar plugin and nested shorttags don't work there either. Might be an architectural problem of WordPress ? :-(

  4. jRayx
    Posted 5 years ago #

    in "optional-content\optional-content.php" around line 160 it looks like this :

    return $content;

    Add this snippet before that line :

    $pattern = "/\[.*\]/";
                    if (preg_match($pattern, $content, $matches))
                        foreach ($matches as $shortcode)
                            $content = str_replace($shortcode, do_shortcode($shortcode), $content);

    So far this works with what i've tested. Enjoy :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Optional Content
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic