image extraction from wordpress page
i’ve been building a custom wordpress theme for a client and as part of the CMS requirments they wanted to have a slideshow gallery for their projects.
i’ve used the smooth slider plugin which takes the first image in every post added to it and displays it as a gallery, i’ve then called the gallery from the sidebar…
the only problem was that when you were viewing the page relating to a specific gallery item (project) there was no way of controlling what image was shown on the gallery
but i added this nice little bit of code inside “the loop”, which test to see if the content has an image in it and then displays it in the sidebar (rather than the main content) and if it doesnt have an image displays the scrolling gallery.
so all images within the_content() are stored in the array and can then be passed to some jquery image rotators.