• Resolved pottwahl

    (@pottwahl)


    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

    (@dglingren)

    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)?

    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

    (@pottwahl)

    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

    (@dglingren)

    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/“, 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

    (@pottwahl)

    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

    (@dglingren)

    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 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

    (@dglingren)

    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.