Support » Themes and Templates » control which image is displayed, via url

  • I’ve got a page with several attached images. One will be featured, the rest will be displayed in a thumbnail carousel below it. So far, so tricky, although there seem to be several useful functions for getting the attachments out of pages and displaying them uniquely.

    I can hardcode the page template file to display a particular image (ie: pull the fourth attachment image out and ‘feature’ that one), but the client wants permalinks to individual images within the carousel. So going to a specific URL will load the page with the specified image at the top (and, even better, presumably with the carousel auto-scrolled to that point…).

    I have no idea how to go about it.

    I’m assuming something with the URL hash will work best, ie:

    … but I’m clueless as to how to actually implement that sort of functionality. Can anyone suggest a method, or am I barking up the wrong tree?

  • The topic ‘control which image is displayed, via url’ is closed to new replies.