• Resolved lwcorp

    (@lwcorp)


    Your widget doesn’t seem to run on certain external shortcodes by other plugins.

    I may have found the reason – the shortcodes that don’t work in MLA Text Widget don’t use add_shortcode but run directly on contents.

    If you can confirm that’s the reason, I’ll ask them to fix this. But they haven’t updated their plugins for more than a year, so it may be a lost cause.
    Plus who knows how many other plugins out there suffer from the same issue, so please find a way to run them anyway, just like WP runs them anyway.

    Examples:
    Works in MLA Text Widget and uses add_shortcode:

    Doesn’t work in MLA Text Widget and doesn’t use add_shortcode:

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your report and for the links to the plugins you’ve found.

    The Raw HTML and Insert PHP plugins both state that they work on “posts and pages”. Neither plugin makes any claim about working with a Widget. I wouldn’t expect them to work in the MLA Text Widget, since Widgets run in a different way.

    The MLA Text Widget is provided as a convenience for users who want to run the [mla_tag_cloud] and [mla_term_list] in a widget but haven’t installed any of the other plugins that support shortcodes in a widget. At this time I have no plans to enhance the MLA Text Widget beyond its current scope.

    You could try the new WordPress “Custom HTML” widget to see if it works with the plugins you mentioned.

    I am marking this topic resolved simply because I have addressed the issue. Thanks for your understanding.

    • This reply was modified 7 years, 3 months ago by David Lingren.
    Thread Starter lwcorp

    (@lwcorp)

    Alright, I’ve tried and neither the text widget nor the new HTML one can run shortcodes. I would say that’s because widgets aren’t supposed to run shortcodes. Isn’t that why you created your special widget in the first place?

    So given that widgets aren’t meant to run shortcodes, we can’t directly blame the aforementioned plugins for not supporting widgets. I just wish your widget ran shortcodes as if they were in a post/page, the way they were meant to run.

    Plugin Author David Lingren

    (@dglingren)

    I understand you frustration, but if it doesn’t use add_shortcode(), it isn’t a shortcode. These plugins may use a shortcode-like syntax, but they process it themselves in a non-standard way.

    I have not examined their code but I imagine it uses the filters WordPress provides for posts/pages to do their work. These filters are not used in widgets, which is why they don’t work there. Without WordPress core support there is no straightforward way to do anything similar.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Some shortcuts don’t run in MLA Text Widget’ is closed to new replies.