Support » Plugins » Creating a plugin: how to get the current template path

  • Resolved ELAN42.com

    (@nokao)


    Hi… I’m editing a plugin and I need the path of the template that the user is using.

    How do I use the get_bloginfo() function inside a plugin php file?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The problem is that using, inside a plugin, the code:
    $MYVAR=bloginfo(‘template_url’) . ‘img/’

    I don’t have the template_url in the MYVAR variable…
    Instead I have the template_url putted before the “header” of the blog, like a php error.

    That’s probably because calling the bloginfo function makes it go inside the output stream of php, like an ECHO, but I don’t want this.
    How to resolve the problem?

    Using:
    get_bloginfo

    resolved the problem

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Creating a plugin: how to get the current template path’ is closed to new replies.