Home Echo shortcode in another shortcode
Reply: 0

Echo shortcode in another shortcode

user336
1#
user336 Published in May 27, 2018, 3:30 am

How to display shortcode in another shortCode.

function html_block_short_code() {
  $content_id = get_post_field('post_content', 180);
  ob_start();
  echo do_shortcode("$content_id");
  return ob_get_clean();
}
add_shortcode('html_block','html_block_short_code');

Thanks for answer.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.311314 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO