Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Featured Images / Image Slider

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #40974
    inlmbrt
    Participant

    Hello

    I’ve been struggling to figure out the complicated dynamics (well, to me) of the WordPress featured images function.

    I’m trying to get my home page to show the latest featured image from a custom “portfolio” post type where an image slider might go.
    I also want to have smaller featured images from the same post type underneath the main image.

    Please see the linked image for a better explanation.

    [FEATURED IMAGE EXAMPLE](http://s12.postimage.org/nh1qpgmj1/Latest_Post.jpg “FEATURED IMAGE EXAMPLE”)

    Any help would be hugely appreciated.

    Thanks
    :)

    #115363
    chrisburton
    Participant

    @inlmbrt Depending on how you want the slider to function, my site is somewhat similar. I use a custom fade slider which is only 25 lines of code.

    I assume you want the thumbnails to navigate the slider?

    #115394
    inlmbrt
    Participant

    I was hoping to show the latest post from the “portfolio” custom post type as a large static featured image at the top of the page.

    I was then going to have the rest of the latest posts from the “portfolio” custom post type as smaller, squared featured images excluding the latest post (which is already at the top of the page).

    Hope I’m making sense! :]

    #115395
    chrisburton
    Participant

    @inlmbrt Well, that can all be done via PHP. I’m not understanding where the slider comes into play. Can you explain?

    #115396
    inlmbrt
    Participant

    It was a bad example, but I meant the latest featured image from the “portfolio” post type going in the same place a slider might be.

    #115435
    inlmbrt
    Participant

    I’m not wanting the main image to be a slider (no sliders at all in fact), rather a static featured image with a link to the that post.

    Does this make better sense?

    #115447
    chrisburton
    Participant

    @inlmbrt All right. Try the code below. The first loop gets the latest post from portfolio for your main image. The second loop gets the rest and sets them in a thumbnail.

    array(‘portfolio’),’post_status=publish’,’posts_per_page’ => 1));
    while ( $loop->have_posts() ) : $loop->the_post(); ?>
    “>

    array(‘portfolio’),’post_status=publish’,’offset’ => 1));
    while ( $loop->have_posts() ) : $loop->the_post(); ?>
    “>

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.