• Resolved berlinaut

    (@berlinaut)


    Since last WP Update or Theme Update (?) the function do_shortcode() doesn’t generate any output!

    I’m using WP 5.7 and a child theme of twentysixteen (v2.4). I changed header.php in parent theme as usual to display a oneliner of the “op-is-open” widget like this:

    <div class="header-opening-hours">
    <?php
      echo do_shortcode( '[op-is-open set_id="5" show_next="true" next_format="Wieder ge?ffnet %2$s %1$s - %3$s Uhr" show_today="open" today_format="(%1$s Uhr)"]' );
    ?>
    </div>
    </header><!-- .site-header -->

    Unfortunatly there’s no output generated inside the <div class=”header-opening-hours”> container. Tried already to create a new set (with a fresh ID) but this doesn’t work neither.

    Does anybody has the same problem?

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter berlinaut

    (@berlinaut)

    Ok. I made it work again. I deleted my old working set (containing a lot of holiday entries and exceptions) and created a new one from scratch. Suddenly the shortcode works again.

    Very confusing was, that the shortcode (with the original set_id) above worked on pages and posts but didn’t in the header.php.

    Btw.: the WP 5.7 wasn’t the problem, cause on my local test installation everthing worked fine after the update.

    Mysterious.

    Plugin Author janizde

    (@janizde)

    Hey @berlinaut , thanks for the report! I’ll close the issue since it seems to work again, I will keep an eye out for issues with WP 5.7 however.

    Cheers
    Jannik

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘do_shortcode() doesn’t work since last WP Update to 5.7’ is closed to new replies.