Same Shortcode not executing second time

enter image description here

I am developing a theme for our organisation, I have developed the following shortcode that generates a card view.

public function omnizzCard( $atts, $content = "" )
    $atts = shortcode_atts( array(
        'width' => '20 rem',
        'icon' => 'face',
        'title' => 'Card title'
    ), $atts, 'omnizz_card' );

    return ob_get_clean();


<div class="card" style="width: 20rem;">
    <div class="card-block text-center">
        <div class="">
            <i class="material-icons md-48"><?php echo $atts['icon'] ?></i>
        <h4 class="card-title"><?php echo $atts['title'] ?></h4>
        <p class="card-text"><?php echo do_shortcode( $content ) ?></p>

I am applying the shortcode like following:

But it showing single card not the second.

I also checked to inspect element on the chrome, its only displaying the single card element not the second one.

Can anyone help me to find out what wrong i have done?

Read more here: Same Shortcode not executing second time

Leave a Reply

Your email address will not be published. Required fields are marked *