Re: Writing a new plugin – get 404 not found when accessing screen
Once you have set your plugin up as a root component, you can write your own screen function, like so:
`function mapo_directory_setup()
{
global $bp;
if( $bp->current_component == $bp->mapology->slug )
{
$bp->is_directory = true;
do_action( ‘mapo_directory_setup’ );
bp_core_load_template( apply_filters( ‘mapo_template_directory’, ‘maps/index’ ) );
}
}
add_action( ‘wp’, ‘mapo_directory_setup’, 2 );`
I use something like the above in one of my plugins. You’ll have to adjust the if statement to your needs.
So basically you have different screen functions for your members pages and your directory page (as you should