WordPress.org

Ready to get started?Download WordPress

Forums

WordPress gallery for documents (1 post)

  1. Kimikaze
    Member
    Posted 1 year ago #

    I'm trying to find out how I can use the media manager "create gallery" functionality with a theme or plugin. An input field will store the shortcode or data. The problem is I can't find out how I can make the gallery functionality to not only display images. This could be useful for making document lists.

    Changing line 646 in the media-views javascript file from:
    this.set( 'library', media.query({ type: 'image' }) );
    to
    this.set( 'library', media.query({ type: '' }) );
    seems to open up for all types of attachments, but how can I override this with a filter or in a custom javascript?

    In addition I was wondering if it is possible to get other types of posts too? This last bit is more out of curiosity, and not something I need now.

Topic Closed

This topic has been closed to new replies.

About this Topic