• A plugin I’m using has templates that use things like these in the backend…

    %file_post_id%
    %downloads%
    %file_author%
    etc

    …to display the corresponding information when viewed from the front-end. I’m not sure if you would call them shortcodes? Since they’re not used in posts/pages but rather in the settings of the plugin itself.

    Anyway, I need to run a function like this:

    <?php echo wp_count_comments(%file_post_id%)->approved; ?>

    But the percent signs are giving me trouble. How can I do something like this?

    Thanks for any help.

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to use a plugin's "template tag" in PHP?’ is closed to new replies.