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

  1. j3ddesign
    Posted 4 years ago #

    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,

  2. Michael Moore
    Posted 4 years ago #

    Maybe a problem here posts_per_page' => -1?

  3. j3ddesign
    Posted 4 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
    Posted 4 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!


  5. j3ddesign
    Posted 4 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:


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.