I have a project that has content being filtered throughout the site (many custom WP_QUERY calls). Originally there was no URL needs, just filtering by $_SESSION variable. Works perfectly, but NOW client wants each specialty to be loaded with a custom URL (much like categories do already). I need to to first know:
Is it possible to make a permalink structure with the $_SESSION variable?
If so:
How can I create a URL structure like this?
Archive Page:
http://domain.com/session-var/
Single Page:
http://domain.com/session-var/post-name
So I was able to figure this out myself with the help of a great friend and php developer. I apologize some of the functionality
i.e. CUSTOM::slugify()
is custom but if necessary you can review my Div Starter theme to learn more about it.}
I noticed my pagination was using this new permalink structure and breaking it so I was able to hook into it and remove the addition like this:
For more information about customizing your permalinks this guide was really helpful