Forums

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

Home Forums Back End FancyBox – Turn on for only certain images in loop

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32734
    Danilux
    Member

    I’m using FancyBox to display full images of each work in my wordpress portfolio page when the user clicks them,
    but only 2 items need to show full images and the others should just display the image without the link to the full image and without fancybox.

    My question is can I somehow add a class or an Id to these 2 items in the loop so only these are affected by fancybox. I’m using custome post types for each portfolio item and featured image is used to show each small image in the loop.

    This is what I want to acomplish in the loop:

    but others items won’t have full-image, and should remain:

    #76164
    Danilux
    Member

    Ok I’m trying to come up with the logic to get this, I’m thinking kinda like:



    echo the link with a class .fancyImage wrapping the image with the .frame class


    'frame')); ?>
    } ?>

    .frame is a class to style these images so don’t worry about that.

    #76079
    Danilux
    Member

    Ok more information, I’m using the normal image size as featured image and the full size images that I want inside the link is uploaded via the normal media library.

    The normal images are targeted with the_post_thumbnail, now I need a way to target the full image size from the media library to place it inside the link.

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