Fancy linking to WP Pages like in archives?
-
Hello,
I’d like to make links to pages like they’re made to the archives. So, for example, my permalinks is set to:/archives/%postname%
I want to create a dynamic page which lets you link into it just like that, changing its behaviour. It’s a gallery page (I’ve made it, no problem – goes through a folder, outputs all the images it finds), and I’d like to be able to link to particular images in a similar style as to posts. So I desire to make links in this style:
/<gallery name>/<image name>
Possibly even more complex, in the style of /archives/%year%/%month%, I’d like to be able to link to /<gallery name>/<gallery type>, and /<gallery name>/<gallery type>/<image name>. The idea is that it still takes you to a WP Page, but that the PHP picks this up and makes modifications (eg. displays only that image category or that image).
As I said, I already have a functioning gallery page. I’d like to extend its functionality. I have a basic grasp of PHP (I’ve modded quite a bit of code, template tags are easy, calling functions no problemo) but very little experience.
The website: https://www.loinhead.net/
archives/%postname% example: https://www.loinhead.net/archives/fable-2-milestone
archives/%year%/%date% example: https://www.loinhead.net/archives/2007/01/
A gallery page: https://www.loinhead.net/fable-2-gallery/
- The topic ‘Fancy linking to WP Pages like in archives?’ is closed to new replies.