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

  • Resolved j3ddesign


    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

    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:

    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,

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


    Maybe a problem here posts_per_page' => -1?



    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!



    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!



    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:

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