WordPress.org

Ready to get started?Download WordPress

Forums

Accessing Variables from Plugin in Templates (3 posts)

  1. gellpak
    Member
    Posted 8 years ago #

    I've written a small plugin that pulls a vBulletin cookie's value, checks the userid with the database and pulls various other info from the vBulletin user database. I want to use this information to have the whole "Welcome back, username!" , etc. style messages on my wordpress pages, but I can't seem to access the variables I set in the plugin from my templates.

    I have the plugin running at the init action, and the templates I'll need it in (if that matters) are header and header_home. How can I get these variables set where they're accessible, or perhaps just manually call that function from the templates?

  2. MichaelH
    Member
    Posted 8 years ago #

    Writing_a_Plugin is a good lead-in to many of the articles under Category:Plugins

    Other info at: Category:Template_Tags and Category:Functions

    Welcome to WordPress!

    Please help make the Forums more successful by reading:
    http://wordpress.org/support/topic/39501

    And, thank you, for letting us know if this information proves useful (or not)!

  3. gellpak
    Member
    Posted 8 years ago #

    Right right, thanks for making an intelligent stab at answering my question... is there anyone that would actually be so kind as to try to help instead of referring me to the usual stuff that I searched before posting and which didn't give me anything useful to work with?

Topic Closed

This topic has been closed to new replies.

About this Topic