Support » Plugin: Document Gallery » Display documents attached to a different page

  • I’d like to think this is not impossible, but not sure if it’s a feature currently available or easily implemented.

    I want to use the [dg] shortcode to display all attachments on a specific page. Let’s say I am using [dg] on page b and want to display the attachments from page a. something like [dg post_id=1] or [dg page=a]
    I can see that category/taxonomy can be used, and documents can be called by id, but what about a query for the page id?

    http://wordpress.org/plugins/document-gallery/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Dan Rossiter

    (@danrossiter)

    Interesting. I’ve never gotten that suggestion before. With the current framework, it wouldn’t be difficult to implement.

    Let me think on this for a bit.

    -Dan

    Thread Starter Sean

    (@seannorton)

    Awesome, thanks for your prompt and promising reply. While you’re at it, another feature that may be beneficial to folks is to have an exclude option when using the shortcode.
    This should presumably be exclusive of the attribute for including specific IDs where you cannot use both in the same shortcode. So like [dg exclude=1,5] where 1 or 5 are the ids of the files which should be excluded from being displayed.

    If you ever develop this feature then you could implement syntax similar to the [gallery] shortcode:
    http://codex.wordpress.org/Gallery_Shortcode

    Example:
    id specify the post ID. The gallery will display images which are attached to that post. The default behavior, if no ID is specified, is to display images attached to the current post. For example, to display images attached to post 123:
    [gallery id="123"]

    Plugin Author Dan Rossiter

    (@danrossiter)

    Thanks for the suggestion. I was leaning toward something along those lines.

    I’ve actually been meaning to go through the core dg generation code and convert it almost entirely to use source from WP’s gallery shortcode. I was much less knowledgeable of the WP core when I began this plugin so some things could definitely be improved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display documents attached to a different page’ is closed to new replies.