Yeah, I’m running into the same issues. It seems like the BuddyPress plugin does this, but it’s a lot of code the wade through. What I’ve been able to gather is you can do some tricks with URL detection and redirection to pages.
So for me, I want domain.com/recent/ to display something. In my plugin, I am doing this:
$clean_uri = clean_url( $_SERVER['REQUEST_URI'] );
if ( str_replace ( '/', '', $clean_uri) == 'recent' )
{
status_header( 200 );
$wp_query->is_404 = false;
$wp_query->is_page = true;
load_template ( get_template_directory() . '/index.php' );
}
If you do that, you’ll get an error: Fatal error: Call to undefined method stdClass::get() in D:\dev\vhosts\pam\public\wp-includes\query.php on line 27
That’s probably because of the template I’m trying to load. But for your purposes, you might not need to load that template. You might just include your own PHP files to handle that.