9 | | In the case of BP pages, steps (1) and (2) go just fine - WP successfully finds our page called `members` - but it fails at step (3). That's because `members` is not the *last* chunk of the request, which in turn is because we are constructing our URLs in a non-standard way. As a result, the function returns false, and `WP::parse_request()` fails to locate a match, which is the source of the 404. (BTW, having an attachment or a manually created page with `post_name = 'admin`` will trick `get_page_by_path()` into returning true, which explains wpdennis's perplexing attachment report in the OP.) |
| 9 | In the case of BP pages, steps (1) and (2) go just fine - WP successfully finds our page called `members` - but it fails at step (3). That's because `members` is not the *last* chunk of the request, which in turn is because we are constructing our URLs in a non-standard way. As a result, the function returns false, and `WP::parse_request()` fails to locate a match, which is the source of the 404. (BTW, having an attachment or a manually created page with `post_name = 'admin'` will trick `get_page_by_path()` into returning true, which explains wpdennis's perplexing attachment report in the OP.) |