Add URI sufix to all permalinks in a specific theme
-
I’ve a website that uses a multi-theme plugin, filtered by the URL string:
https://www.vintageisthenewold.com/cia/
It works fine, but my problem is that the post links displayed on that page, for example:
https://www.vintageisthenewold.com/ultima-iv-remastered-source-code-on-github
if clicked on, it will show the main theme instead, since the URL does’t have “cia” in it.
My solution for the problem is to add a parameter to all permalinks displayed by the secondary theme “cia”, like this:
https://www.vintageisthenewold.com/ultima-iv-remastered-source-code-on-github/?ciatheme=1
I managed to hack the code in page-content.php and post-single.php in order to accomplish that, but I wonder if there is a more elegant and efficient way to do that: Some hook that will add a parameter to all permalinks displayed by this theme.
Any ideas?
Thanks
Paulo
- The topic ‘Add URI sufix to all permalinks in a specific theme’ is closed to new replies.