Skip to:

Re: Writing a new plugin – get 404 not found when accessing screen

Thanks, @jeffsayre. I must have missed that page when I was browsing the Codex. I was following the Skeleton Component because my coworkers had recommended it to me. However, apparently none of them tried writing a BP plugin that provided a root component!

Now my problem isn’t that I’m getting a 404 error anymore. Instead, now when I go to “/groupsdir”, BuddyPress is redirecting me to the root “/”, without an explanation. Spent the last hour or so trying to figure out where this is happening. No luck so far, but I’ll keep looking.

@travel-junkie: You explained how root components were registered, and that `bp_core_new_nav_item` adds to the member’s menu, not to the root. But surely I still need to call `bp_core_new_nav_item` to tell BP which screen function to use when the “groupsdir” component is requested – right? So I’m still using `bp_core_new_nav_item` to provide that information – *in addition* to calling `bp_core_add_root_component` to state that “groupsdir” is also a root component. Is this correct?

Skip to toolbar