Buddypress, “$bp->current_component” returns empty string

I’m new to buddypress. I’ve just referred ‘John James Jacoby’ to create a custom page dynamically without going into the admin panel.

I can get the current component name in default buddypress pages using the below code:

Read More
global $bp;
var_dump($bp->current_action);

But the problem I face here is that when I try create a new page as mentioned in the ‘John James Jacoby’, I get 404 error.
I can’t figure out what is going on. Any help would be appreciated.

Thanks in Advance..

Related posts