Endpoint on Specific Page Slug

I have created an endpoint inside of my plugin:

add_rewrite_endpoint( 'libstaff', EP_PAGES );

Now I would like to have the endpoint work for one page only based on its slug. In this case, I want it to work ONLY when the page with the slug ‘staff-directory’ is at the end of the URL.

0

Leave a Comment