Grow your CSS skills. Land your dream job.

WordPress custom fields/multiple featured image issue.

  • # February 27, 2013 at 11:26 am

    Hello,

    http://allyouneedis-justask.com.s156312.gridserver.com/make-up/

    The client above has asked for each portfolio page to have three images with three smaller images beneath them. The larger three images link to their respective pages. To achieve what I have got so far I have used multiple featured images however I am starting to think this isn’t the best approach as if I carry on the back-end will have 12 featured image sections.

    Any ideas? I’m not particularly confident with PHP

    # February 27, 2013 at 11:42 am

    So are we talking about 12 different images? Three blocks, each with 4 images (one large one and three small ones)? And each image just links to another page?

    If that’s the case, I would give each of the 12 pages their own featured image first. Then one the Make-up page, you just pull the featured image from each page you’re linking to, and display that one. That way, each page just has one featured image section.

    So it would be something like this (you’ll just have to put this in a loop for all 12 pages):

    <a href="<?php the_permalink(); ?>"><img src="<?php the_post_thumbnail(); ?>"></a>
    

    Hope that makes sense.

    # February 27, 2013 at 12:56 pm

    A bit more context would help.

    Do the three small images have any other purpose other than being displayed on the page?

    Do they link to a new picture / attachment?

    # February 27, 2013 at 4:29 pm

    Sorry – The three smaller images just relate to the bigger picture, they would not be links so would not have their own pages.

    Maybe having 4 featured images per page?

    # February 27, 2013 at 5:23 pm

    If they serve no other purpose than being displayed on the page, wouldn’t it make sense to “collage” each group together into one image and use that as the featured image for the post/page?

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".