Title: rewrite permalink
Last modified: May 25, 2019

---

# rewrite permalink

 *  Resolved [pottwahl](https://wordpress.org/support/users/pottwahl/)
 * (@pottwahl)
 * [6 years, 12 months ago](https://wordpress.org/support/topic/rewrite-permalink/)
 * Hello.
 * How can I overwrite the slug “/attachment_category/” in the URL according to 
   my own ideas?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [6 years, 12 months ago](https://wordpress.org/support/topic/rewrite-permalink/#post-11574212)
 * Thanks for your question. I hope I understand what you are trying to accomplish.
   The closest thing I can think of is creating a “Category Archive” page that displays
   the Media Library items assigned to a term in your Att. Categories taxonomy. 
   If that’s the case you can find several tips and ideas in this earlier topic 
   and the topics it links to:
 * [Create an archive of media (attachements)?](https://wordpress.org/support/topic/create-an-archive-of-media-attachements/)
 * If those topics aren’t helpful or if I haven’t understood your question, any 
   further details you can supply will be of great help. I will leave this topic
   unresolved until I hear back from you. Thanks for your interest in the plugin.
 *  Thread Starter [pottwahl](https://wordpress.org/support/users/pottwahl/)
 * (@pottwahl)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/rewrite-permalink/#post-11577080)
 * Hello, David.
    First of all thank you very much for your sensational plugin!
 * I don’t think my English is the best – sorry.
    What I mean is to change the URL
   created by your plugin. E.g. “www.topleveldomain.com/attachment_category/downloads/”
   to “www.topleveldomain.com/abc/downloads/”.
 * I would like to rename the domain part (category slug) “/attachment_category/”
   or even leave it out.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/rewrite-permalink/#post-11578022)
 * Thanks for the additional details about your question and for your kind words.
   To give you a proper answer it is necessary to know where the URL(s) are found
   and how they are generated. In many cases, URLs that refer to “taxonomy archive
   pages” are generated by WordPress, not MLA.
 * Traditional WordPress archive pages are designed to display posts and pages, 
   not attachments/media items. The earlier topics found in the topic I provided
   a link to discuss this issue and several solutions in more detail.
 * If the URLs you want to change are generated by MLA’s `[mla_gallery]`, `[mla_tag_cloud]`
   or `[mla_term_list]` shortcode you can change them in any way you want. However,
   you also have to ensure that the destination, e.g., “**_[http://www.topleveldomain.com/abc/downloads/](http://www.topleveldomain.com/abc/downloads/)_**“,
   is a valid destination in your site.
 * If you tell me where the URLs appear and how they are generated I can give you
   more specific guidance. Thanks for any additional details you can provide.
 *  Thread Starter [pottwahl](https://wordpress.org/support/users/pottwahl/)
 * (@pottwahl)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/rewrite-permalink/#post-11587556)
 * Hello.
    I have created a **media category (downloads)** with several subcategories–
   PDF files are then assigned accordingly. In the frontend I output all this via
   the template file “**taxonomy-attachment_category.php**“. There I created a loop
   for the output and built in a dropdown menu (with -> **wp_list_categories**).
   The PDFs assigned to the category are then displayed via the dropdown when I 
   select one. In the main menu of the website I added the category “**downloads**“.
   By clicking on “downloads” the URL “www.topleveldomain.com/**attachment_category**/
   downloads/” is displayed.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/rewrite-permalink/#post-11594005)
 * Thanks for your update and the additional information. It looks like you’ve done
   a lot of good work towards a solution.
 * Your enhanced `taxonomy-attachment_category.php` template sounds sensible, but
   I do not see what role, if any, the MLA plugin has in your solution. The only
   possibilities I can think of would be to replace your use of `wp_list_categories()`
   with an `[mla_term_list]` shortcode, or your “loop” with an `[mla_gallery]` shortcode.
   Both of these are discussed in the earlier topics I posted links to above.
 * You wrote “**_In the main menu of the website I added the category ‘downloads’_**“,
   which contains the link you want to modify. You would have to find a way to make
   your modified template page become destination of whatever link you code behind
   the category menu entry. You can probably find a way to use the [WordPress template hierarchy](https://developer.wordpress.org/themes/basics/template-hierarchy/)
   to do that.
 * All of this looks fine but, again, I don’t really see how MLA is involved. Unless
   you have an MLA-specific question I do not see how I can be of help.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/rewrite-permalink/#post-11791516)
 * It has been two months since the last post in this topic. I hope you have found
   a solution that works for your application.
 * I am marking this topic resolved, but please update it if you have any mla-specific
   problems or further questions regarding the above suggestions.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘rewrite permalink’ is closed to new replies.

 * ![](https://ps.w.org/media-library-assistant/assets/icon-256x256.png?rev=973502)
 * [Media Library Assistant](https://wordpress.org/plugins/media-library-assistant/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-library-assistant/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-library-assistant/)
 * [Active Topics](https://wordpress.org/support/plugin/media-library-assistant/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-library-assistant/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-library-assistant/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [David Lingren](https://wordpress.org/support/users/dglingren/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/rewrite-permalink/#post-11791516)
 * Status: resolved