Page slug
-
I am building a CMS and am trying to build a “Department” template. I am designing WordPress so that my Department pages have the same slug as their respective category and link categories.
In the template I would like to extract the permalink slug of the page so that it can be used with the category and link categories.
For example, at this page:
https://localhost/wordpress/dept/human-resources
I want to be able to extract “human-resources”, put it into a variable, and use it with:
https://localhost/wordpress/category/human-resources
https://localhost/wordpress/link-category/human-resourcesThe permalink_anchor template tag did not turn up any results, and I poured over the template tags. I suppose if this isn’t supported by the wp-core I’ll just extract using php.
Anyone know of some other way to do this? It seems like I am missing something obvious.
- The topic ‘Page slug’ is closed to new replies.