In Wordpress I have a page with the slug logged-user
with a parent page ecadmin
, making it accessible under the URL /ecadmin/logged-user/
.
Since it has a parent page, I (or any other user) can create a page with the same slug logged-user
as long as it isn't nested under the same parent page.
The problem now is that I cannot create a single page template page-logged-user.php
in theme's folder, as this template can be potentially applied to any other page named logged user
no matter where it belongs hierarchly.
Is there a way to name the template file in such way that is referencing to its parent page(s) as well? E.g. page-ecadmin-logged-user.php