Support » Plugin: Simple Blog Stats » Using shortcode in php file

  • Resolved Andrzej_K



    is there an option (I guess it is) to use plugin’s shortcodes in php file?
    When i’m trying to use:
    <php? echo do_shortcode( ‘[sbs_users]’ ); ?>
    I don’t get any result.

    Thanks for Your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeff Starr



    It looks like the code you are using is incorrect. The question mark is in the wrong location, and the quotes should be straight quotes, not curly quotes. Here is the correct syntax which is tested and works perfectly:

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

    You can add that anywhere in your theme template to display the number of users registered with your site.



    Ach, here is the point! Thank’s Jeff – now it works like a charm!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using shortcode in php file’ is closed to new replies.