Support » Themes and Templates » Using additional template pages

  • I would have thought that this would have been covered before, but I searched for most strings that I could imagine that relate to the topic, and couldn’t find anything.

    I created a plugin that takes a Picasa exported gallery and displays it on a post, just by using the add_filter api hook. The gallery is constructed of thumbnails on the main page, and then each thumbnail links to the full size image.

    I’d like to make this a little bit more sophisticated now and have the thumbnail link to another page that maintained the theme of the site, displayed the image in the correct location, based on the theme itself and also some previous and next buttons to link to the corresponding images.

    I’d like to do it “within” WordPress. That is, have a custom template page, say image.php in the template directory, and just link to (or a corresponding URL that makes use of the rewrite rules) and have WordPress automagically know to use the image.php template file.

    I’ve had a quick glance through the source, but I thought I’d find out if it’s possible without hacking up WordPress. I’d like to do it without hacking, but if I had to, then I guess I can, but that makes it less useful for the general public, and I know of a few people that’d like to use it for their own site.

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Have you checked the various Image/Gallery Plugins or straight PHP galleries that do what you want already?

    Also check:

    Thanks for the reply, but that doesn’t answer the question I was asking. I’ve tried many of the gallery plugins, and none of them did what I want… so I wrote my own.

    I manage my pictures using Picasa, and Picasa exports some rather tasty galleries. I just read in the XML file and display the pictures in the place of a certain tag that the plugin looks for.

    Now I want to extend it a little bit and add an additional template file… I was wondering if there way anyway to call a non-standard template page, using the regular index.php file.

    So, for example<file&gt; which would call up the non standard template theme and pass the query arguments to the page so it could find the image file and display it as a slideshow. This way it stays completely integrated within WordPress, without clogging up the database with unnecessary crap, like some other plugins.

    Hi, I understand what you are trying to do, and I just posted the first public release of it….

    I got a bit annoyed with direct image linking in WP-Picasa-Gallery, and I dont like the idea that WPicasa generates an entry for each photo (I have large photo albums, so it spams my admin panel).

    So I’ve updated WP-Picasa-Gallery and added a helper script which automatically generates Photo Pages on the fly as they are requested. It also features nice Previous and Next links (with Thumbnails), as well as better Caption display.

    You can find more information and download link here:
    or view my live photo album running the script.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using additional template pages’ is closed to new replies.