Home > Software design >  How can I call a WordPress shortcode in specific template
How can I call a WordPress shortcode in specific template

Time:07-01

I use Simple Blog Stats WordPress plugin and I want to show numbers of users. Simple Blog Stats WordPress plugin has a shortcode [sbs_users]. But I want to show it on specific template - search_paralex_2.php and I can't use shortcode here. I try

<?php echo do_shortcode('[user_count]');  ?>

But I get result - [user_count]

CodePudding user response:

Did you try this ?

<?php echo do_shortcode('[sbs_users]');  ?>

The shortcode you write in your example is [user_count]

  • Related