fix errors & warnings
Only use twig context caching when cache is true
reverse condition logic on cache check
fix warnings & errors
fixes bbPress compatibility
Merge pull request #121 from presscodes/bbpress-compatibility

Bbpress compatibility