[wp-hackers] Accessing a plugins function from theme

Mike Schinkel mikeschinkel at newclarity.net
Wed Jul 21 09:24:01 UTC 2010

Obvious question, but; I assume you've activated the plugin?
If yes, your function isn't wrapped in a class, is it?


On Jul 21, 2010, at 5:21 AM, Christian Gundersson wrote:

> Hi,
> Thanks for the replies. I see now that I probably should have clarified a
> bit more :)
> I have done this but my function isn't getting called like it should. I get
> a "call to undefined function" error when I access the theme file.
> I have declared a function foo() in my plugins base file. I haven't attached
> it to any filters or hooks of any kind. In my theme file I call the function
> simply by 
> if ( function_exists ( 'foo' ) )
> foo();
> Have I missed anything, or should that "just work"?
> Thanks again!
> //Christian

More information about the wp-hackers mailing list