Title: Shortcode [op-is-open]
Last modified: August 9, 2018

---

# Shortcode [op-is-open]

 *  [Alfio Piccione](https://wordpress.org/support/users/picaland/)
 * (@picaland)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/shortcode-op-is-open/)
 * we have implemented your plugin in our theme, but we are noticing lately that
   there is an error in the shortcode [op-is-open] because it does not show the 
   correct text.
    Could you tell us where the problem is or if it’s our mistake?
 * This is the php view to show the shortcodes.
 * // In plugin don’t active, return.
    if (! $data->isActivePlugin) { return; }
 * if (isset($data) && 0 !== $data->openingId) {
    echo sprintf( ‘<div class=”dlsidebar__widget”
   >%s</div>’, do_shortcode(‘[op-is-open set_id=”‘ . intval($data->openingId) . ‘”
   open_text=”‘ . esc_html__(‘We\’re currently open.’, ‘qibla-framework’) . ‘” closed_text
   =”‘ . esc_html__(‘We\’re currently closed.’, ‘qibla-framework’) . ‘” next_format
   =”‘ . esc_html__(‘We\’re open again on %2$s (%1$s) from %3$s to %4$s’, ‘qibla-
   framework’) . ‘” today_format=”‘ . esc_html__(‘Opening Hours today: %1$s’, ‘qibla-
   framework’) . ‘”]’) );
 *  echo sprintf(
    ‘<div class=”dlsidebar__widget”><h4 class=”dlsidebar__widget__title”
   >%s</h4> %s</div>’, esc_html($data->openingTitle), do_shortcode( ‘[op-overview
   set_id=”‘ . intval($data->openingId) . ‘” show_closed_days=”true” show_description
   =”true” template=”table”]’ ) ); }
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fshortcode-op-is-open%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [janizde](https://wordpress.org/support/users/janizde/)
 * (@janizde)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/shortcode-op-is-open/#post-10646326)
 * Hi Alfio, can you please tell what the error is so what is not being displayed
   correctly? Instead of using `ìs_shortcode` you can also just call the `shortcode`
   method on the respective singleton instance, e.g.
 *     ```
       $shortcodeInstance = \OpeningHours\Module\Shortcode\Overview::instance();
       $shortcodeInstance->shortcode([
         'set_id' => 1,
         'compress' => true,
         // ...
       ]);
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Shortcode [op-is-open]’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-opening-hours_3e2c4f.svg)
 * [Opening Hours](https://wordpress.org/plugins/wp-opening-hours/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-opening-hours/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-opening-hours/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-opening-hours/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-opening-hours/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-opening-hours/reviews/)

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 1 reply
 * 2 participants
 * Last reply from: [janizde](https://wordpress.org/support/users/janizde/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/shortcode-op-is-open/#post-10646326)
 * Status: not resolved