Ready to get started?Download WordPress


WP Better Attachments
[resolved] Gallery display? (3 posts)

  1. artgeek
    Posted 8 months ago #

    I'm using this plugin with some Custom Post Types I've created and have been successful at getting the list of attachments with the related icons to show up, but ideally want to display a gallery of thumbnails (that then use my existing lightbox plugin to display larger versions) using a custom image size I've added...is this possible or am I trying to force this plugin to do something beyond its intended purpose?

    I was previously able to get the thumbnails to display as desired using a custom get_posts array that pulled the attachments related to each post, but realized 1. I'm likely duplicating a functionality of this plugin and 2. (more importantly) my returned list of images was not reflecting the order displayed on the admin side of things.


  2. dholloran
    Plugin Author

    Posted 8 months ago #

    Take a look at wpba_get_attachments() on here http://dholloran.github.io/wp-better-attachments/. Itt is an alias on the main class method that I use to retrieve the attachments every where in the plugin so it will respect any settings/changes to the plugin going forward it returns an array of post objects the exact same as if you where using get_posts so if you still have that code just swap the get_posts with wpba_get_attachments() and pass in an array with the available parameters if needed which it defaults to current global $post->ID and it respects if you want to included the thumbnail. I think you are on the right track I have had a light box like shortcode on t,he lost for awhile just have not completed it.

  3. artgeek
    Posted 8 months ago #

    thanks for this, it's definitely put me on the right track :)


You must log in to post.

About this Plugin

About this Topic


No tags yet.