Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • jwstanley

    (@jwstanley)

    I realise this is 7 months old, but I found it looking for an answer to the same question. So here is a solution for anyone like me who finds this thread looking for an answer. It does use an extra plugin though.
    I’m not a WordPress programmer, but it seems to be the case that WordPress recognises the comment block and ignores everything inside it, so it does not process the shortcodes inside the comment block.

    It’s possible to hide the opening <!–[if lte IE 9]> from WordPress at the critical moment using the plugin:
    Get Post Content Shortcode
    and using nested posts.
    So, in my solution:

    Post-1, with ID 001 contains only the IE if statement
    <!--[if lte IE 9]>
    or whatever you want it to be. This Post is only created to be “included” in the post you want to publish, using the Get Post Content plugin. This plugin has the ability to just get the content part of the post, without its title or any other fields.

    The post you want to publish needs to contain a shortcode from the Get Post Content plugin, to get the content of Post-1, and then your shortcode you want to be affected by the if statement in Post-1, and then the closing comment to close the if block:

    [post-content id="001"]
    [your-shortcode]
    <![endif]-->

    Thank you for this fix!
    (Real Accessability version 1.0, Firefox version 47.0)

Viewing 2 replies - 1 through 2 (of 2 total)