Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: BP_init not working for themes Functions.php


Boone Gorges
Keymaster

@boonebgorges

It’s possible that bp_init is fired too early in the process for it to be detected with functions.php, which is only loaded with your theme (relatively late). Try hooking to something like ‘wp’ instead. You should be able to detect whether BP is activated by doing something like
`if ( !function_exists( ‘bp_loaded’ ) )
return;`

In any case, you should be enqueuing scripts on the init action, which is unrelated to bp_init: https://codex.wordpress.org/Function_Reference/wp_enqueue_script

Skip to toolbar