• I want to use several template tags in my new plugin, but I’m having problems. I thought this would be a way to do it.


    echo "comments_popup_link('No Comments', 'Comments (1)', 'Comments (%)');";

    But that just prints the text and doesn’t run the function. How would I do this? Do I need to set a variable and concatenate it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You need to surround the template tags in <?php ?> tags. Like so:
    echo “<?php comments_popup_link(‘No Comments’, ‘Comments (1)’, ‘Comments (%)’); ?>”;

    Thread Starter cpoteet

    (@cpoteet)

    I appreciate the response, but that’s not working. I’m getting the following error:

    Parse error: parse error, unexpected $end

    I’m trying to use the template tag in a plugin inside a function. (If that makes a difference.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Integrating Template Tags in Plugins’ is closed to new replies.