Attach documents to multiple posts
-
Hello
Is there any way through document gallery to attach the same document to multiple posts (without re-uploading it to each post)
-
Hi Chris,
There definitely is a way to include the same document in galleries on multiple posts. Depending on what specifically your use case is, you can use a couple of different methods.
1. If it is a logical grouping of documents that are all repeated in multiple places then you can use taxonomies to do what you want, as documented on the Installation tab) under the “Categories/Custom Taxonomy Option” header. The categorization of attachments is outside the scope of Document Gallery, but I discuss some plugins that will do this for you [here](https://ww.wp.xz.cn/support/topic/categories-for-media-files).
2. If you build your gallery through the “Create Document Gallery” dialog integrated into the Media Manager (shown on the Screenshots tab) then you can use any attachments you like in creating your gallery — you’re not limited to just those on the current post.
-Dan
PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! 🙂
Hi Dan
Thank you for your reply. What shortcode can I use to enable the plugin to list all the documents in a particular category. I’ve tried category=category-value (the slug of the category). Is that correct?Hi Chris,
Almost correct. This is actually the topic of an enhancement request (using taxon slugs in place of names), but for the moment you’ll want to use the c category name instead of its slug (be sure to use quotes if the name has spaces.
Let me know if that works for you!
-DanHi Dan
Hmmm… I think I must be missing something. This is the code I’m using: [dg new_window=”true” fancy=”false” category=”General Topics”] That’s the category name, so what am I doing wrong? That category is listed in the media categories section.
Thoughts?Hi Chris,
I just went to verify against my own setup and what you’re using definitely looks correct. I’m using
[dg descriptions=true category="New York Times" images=true]on one of my galleries.Do you have logging enabled (Dashboard -> Settings -> Document Gallery -> Advanced tab)? If not, can you try enabling that and viewing the page where you have the gallery setup?
To be honest, I’m a bit stumped. What you are doing *should* be working. I’ll ponder on this a bit…
-Dan
Yes – very strange. I’ve turned on logging and there are no errors. It’s generating in good time. It was just returning a blank page. I changed it to exactly your code: [dg descriptions=true category=”General topics” images=true] and now I’m getting this result on the page: The taxon value entered, “images”, is not valid. There is nothing in the log that saying there are errors.
A dumb question that has to be asked for the sake of completeness:
You have associated all of the attachments you want included with a category called “General Topics” (including correct capitalization of the category)?My next recommendation would be to uninstall Document Gallery and reinstall. In this circumstance I actually do not believe it will help, but it can’t hurt and it rules out a couple of unlikely issues.
-Dan
The topic ‘Attach documents to multiple posts’ is closed to new replies.