Hoping you can help with this...
WE have a 'serivces' custom post type that allows a 'service' to have a parent 'service'. Our custom rewrite rule works for top-level services but not child services.
The url structure would be something like the following where 'test-service' and 'test-service-child' are the post names:
Our existing rewrite rule is as follows:
add_rewrite_rule('^consultancy/(.*)/?', 'index.php?post_type=service&name=$matches', 'top');
Can anyone suggest a modification that will get the post name from the end of the url? Eg in the case of the examples above it should match the following
Any help greatly appreciated. Thanks in advance,