Init hook firing several times
-
Problem: I’ve found that init fires multiple times on my WP site. I found this out while searching for the cause of my session_id() being reset constantly (session_start() is hooked into the init hook), and I’ve added a separate test function to print out some text on init. Whenever the page loads, the test text is printed between 5 – 15 times in the debug log, all entries with different timestamps.
I saw this post on Stack Overflow about this issue being caused by 404’s: https://stackoverflow.com/questions/4372596/wordpress-why-is-the-init-hook-invoked-multiple-times
However, I’ve cleared up all of my 404 issues, and still the problem occurs. Does anyone have an idea as to where I can start looking to resolve the issue?
- The topic ‘Init hook firing several times’ is closed to new replies.