How I can add placeholder in shortcode

function show_the_views_func( $atts ){ $atts = shortcode_atts( array( ‘placeholder’ => ”, ), $atts ); $count = get_post_meta( get_the_ID(), ‘views’, true ); return $count . $atts[‘placeholder’] . ‘ views’; } add_shortcode( ‘show-the-views’, ‘show_the_views_func’ ); echo do_shortcode( ‘[show-the-views placeholder=”test”]’ );

Load gravity form via ajax using do_shortcode

The only way I could figure out how to get do_shortcode working was by using WP_Query. <?php // get current site $args = [ ‘p’ => $post_id, ‘post_type’ => ‘any’ ]; // site wp query $oSite = new WP_Query($args); ?> <?php if ( $oSite->have_posts() ): ?> <?php while($oSite->have_posts()): $oSite->the_post() ?> <div id=”gform_ajax_wrapper_<?=$form_id?>”> <?=do_shortcode(‘[gravityform id=”‘.$form_id.'” title=”false” … Read more