Forums

How do I start a function in a plugin before anything else loads? (2 posts)

  1. xxangel
    Member
    Posted 10 months ago #

    I'm currently writing a plugin, and I would like to start the function before the <html> loads. I was looking at WordPress hooks, but there's no such hook for this?

    Thanks!

  2. rbncha
    Member
    Posted 1 month ago #

    You can set the priority of your method.
    add_action( 'init', 'your_plugin_method', -999999999);

Reply

You must log in to post.

About this Topic