WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Trying to create a custom image gallery (5 posts)

  1. j3ddesign
    Member
    Posted 2 years ago #

    Hi,
    I've been scratching my head on this one for a while now...
    all I want to do is create a custom image gallery using custom post types and taxonomies.
    I have set up a custom post type with the custom taxonomy "albums".

    How i want it to look is similar to iphoto (if your familiar with it), with which all albums are sorted into a grid with each album square filled with small photos from within the album.

    I have got it semi working on my test site, made live for troubleshooting purposes at drobestudio.j3d-design.com/photos

    As you can see it is currently displaying all of the albums with photo's in. however what it is actually doing is creating a loop for the amount of albums, but only showing the first and only one image from within said loop at that.

    template file code found at: http://pastebin.com/XTZhudNZ

    This has been really confusing to try and explain from my manic attempts to get this going, so if you need clarification on anything. let me know :)

    Thanks for the help guys,
    Jordan

  2. imikedesigns
    Member
    Posted 2 years ago #

    Maybe a problem here posts_per_page' => -1?

  3. j3ddesign
    Member
    Posted 2 years ago #

    i cant see how that would cause the issue :/
    thats there to tell it to ignore the posts per page you set in the settings :)

    Thanks though!

  4. j3ddesign
    Member
    Posted 2 years ago #

    Still no closer to finding the issue.
    It's running a loop for each "album", but it seems to only be the first image of the first loop in each. very bizarre!

    http://pastebin.com/XTZhudNZ

  5. j3ddesign
    Member
    Posted 2 years ago #

    never mind, got it working eventually :D
    had simply missed out the "post_type" arg in the query.

    heres the working, cleaned up code for anybody interested:

    http://pastebin.com/dpGWUa2F

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.