I felt that because my website was mainly based on the videos uploaded to the site, I needed to include more about the images on the home page. I had reserved a space on the page with NivoSlider. However when incorporating the channel entries to the slider, I found that the slider did not operate as it should have done. It loaded (well, made dimensions for, the images never actually loaded) the full size images despite being given the link to the thumbnails, I also couldn’t add any channel fields outside of the slider otherwise it would load the slider three times (I planned to have three featured images on the home page).

To get around this, I got rid of the NivoSlider, and replaced it with just an image – it would show the most recent featured image uploaded to the website, and be able to access the other sections where I wanted to show information regarding that particular entry.

The code was pretty much the same as the channel entry for the single entry page, just using the thumbnail image rather than the fullsize image. This also made a point of only selecting entries with a status of “featured”, as defined in the channel entries opening tag. I’ve added a featured status to a couple of images to get this working.

featured image - code

This was the result – a featured image on the home page:

featured image - in place

Advertisements