Support » Fixing WordPress » Trying to create a custom image gallery

  • Resolved j3ddesign

    (@j3ddesign)


    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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael Moore

    (@imikedesigns)

    Maybe a problem here posts_per_page' => -1?

    j3ddesign

    (@j3ddesign)

    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!

    j3ddesign

    (@j3ddesign)

    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

    j3ddesign

    (@j3ddesign)

    never mind, got it working eventually 😀
    had simply missed out the “post_type” arg in the query.

    heres the working, cleaned up code for anybody interested:

    http://pastebin.com/dpGWUa2F

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Trying to create a custom image gallery’ is closed to new replies.