WP Documents Revision document folder haierarchy
-
Is there any way to set up a document folder hierarchy so I can put different document categories into different folders and have sub folders? Wasn’t clear to me if this can be done with Custom Taxomomies or categories. I could find no examples on line.
Thanks,
Dennis
-
I installed Simple Taxomomy plugin and created a custom taxonomy. I went to the Documents tab in the WP Dashboard but could not find have to add an existing document to the taxonomy I created
Your issues should possibly have raised as two different topics.
This reply will be directed to Simple Taxonomy and its capabilities.
This plugin is primarily “just” a front-end for standard WordPress functionality – register_taxonomy – to create custom taxonomies.
I have used it with WP Document Revisions and found it useful. However it suffers from some bugs and it has not been maintained for a number of years. During this time WordPress has extended its capabilities and there are more parameters available giving greater control.
So I have rewritten this plugin as Simple Taxonomy Refreshed. In doing so, I have made all current parameters available. You can control the behaviour of the taxonomy better if you have access to all the parameters. Of course, I will recommend you to use this plugin instead.
I don’t fully understand the problem that you are having, but this may give some pointers.
If you are not seeing the menu item in the document menu, then it could be that:
a) Parameter “show_in_menu” is not set to true and/or “show_ui” is not set to true. (The last one is “Display on Admin” in my plugin.)
b) Your user does not have the necessary capability to manage the taxonomy entries.You set the capabilities in the Permissions tab. If you don’t have the entered Manage Terms capabilities then you cannot access the taxonomy terms.
As you need the edit_documents capability to enter a document, you may want to set Assign terms to edit_documents as well.
How to add taxonomy values to existing posts?
I would recommend that you should ensure that you set the values “show_admin_column” and “show_in_quick_edit” are both set to True. (These are “Display a column on post type listings ?” and “Display in Quick Edit panel ?” in the plugin.)
Then you will be able to update multiple documents without needing to accessing them one at a time. Of course, you won’t get a revision summary entry for the changes.
I hope this is of use – it has little relation to WP Document Revisions. Should you have further issues then if you have installed the replacement plugin and raise them there.
I will respond to your other note later.
Regards,
Neil JamesThis note addresses your original issue.
I would be interested if you could explain what you are trying to do some more please should my suggestions below not help.
The reason I ask is that documents are stored with an obscured name. So if you don’t know the name of the file that you are retrieving – and the plugin hides it from you, then putting it in a different directory doesn’t help you a great deal.
I would also ask you what behaviour would you expect when you change the category that a document is attached to and/or if you link a document to several categories?
It is possible that you are wanting the document permalink to be represented with a URL like site/documents/category/document-name.
Without some other plugin and/or coding, this appears not to be possible.
I would point out that, coupled with a custom taxonomy, some help is already at hand.
As an example, using the plugin Simple Taxonomy Refreshed that I refer to in my other note, I have created a hierarchical taxonomy called “Document Taxonomy” with internal name document_taxonomy that is used for assigning terms to my documents.
Within that taxonomy, I have entries for Meetings (slug meetings) and under that Meetings 2018 (slug meetings_2018).
I have set up a page for Meetings held in 2018 with a shortcode
[documents numberposts=”999″ orderby=”post-title” order=”DESC” document_taxonomy=”meetings_2018″]This will give me a page with all the documents associated with meetings held in 2018. When I upload a document and assign it to the taxonomy term, it is immediately available to be shown on this page. It can be assigned to multiple terms and appear in each of these lists.
Using the plugin, I have also set the RewriteURL option on and defined a slug with name doc-tax.
This creates a number of rewrite rules:
[doc-tax/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?document_taxonomy=$matches[1]&feed=$matches[2] [doc-tax/(.+?)/(feed|rdf|rss|rss2|atom)/?$] => index.php?document_taxonomy=$matches[1]&feed=$matches[2] [doc-tax/(.+?)/embed/?$] => index.php?document_taxonomy=$matches[1]&embed=true [doc-tax/(.+?)/page/?([0-9]{1,})/?$] => index.php?document_taxonomy=$matches[1]&paged=$matches[2] [doc-tax/(.+?)/?$] => index.php?document_taxonomy=$matches[1]
Note. I copied the logic for refreshing the rewrite rules from the original taxonomy plugin. It does not appear to work and I need to test that some more. So I went to the permalinks option and changing nothing, clicked update. This forced a refresh and created these rewrite rules.
I can now enter the URL site/doc-tax/meetings_2018/ to get a list of 2018 meetings.
Whilst custom taxonomies can be hierarchical and you might wish to enter the hierarchy with the rewrite option, e.g. site/doc-tax/meetings/meetings_2018/, it does not currently work like that. You would need more sets of rewrite rules to be created – basically a set for each level that you wish to record.
This option acts like the shortcode, that is, gives you a list of matching documents.
Hope this is of use,
Neil James
- The topic ‘WP Documents Revision document folder haierarchy’ is closed to new replies.