Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for the positive feedback and for your question. The answer depends on where “the permalink to my media page” appears. If you have created an [mla_gallery] shortcode and want to modify the links behind each gallery thumbnail, you can use the mla_link_href parameter to get what you want. For example, if you are using the “Att. Categories” taxonomy your shortcode would include a parameter like attachment_category="my_category_selected" where “my_category_selected” is the slug for the term you have selected. You can add this parameter to your shortcode:

    mla_link_href="{+site_url+}/{+query:attachment_category+}/{+slug+}/"]

    That should get you to your destination. I’m going to mark this issue resolved for now, but please update it if you have any problems with this solution or further questions. It would be great to know how this works for you. Thanks for your interest in the plugin.

    Thread Starter Fulgence Ridal

    (@theeponymus)

    thank you for your rapid answer …
    it is exactly what i want but i’m wondering one thing :

    Imagine such thing :
    you have one media with two categories selected (attached).
    You construct two mla_gallery in category_1 ans category_2
    With your solution :
    mla_link_href="{+site_url+}/{+query:attachment_category+}/{+slug+}/"]
    you have :
    https://www.mysite.com/category_1/my_slug/
    https://www.mysite.com/category_2/my_slug/

    for the same media (i suppose ?). So it can create a lot of problems with google & co.
    So may be it is more logical to have a global variable in the configuration of media library …

    But may be i ‘ve missing something ??

    Plugin Author David Lingren

    (@dglingren)

    I am not an expert in Search Engine Optimization. As your example illustrates, there are many different ways WordPress can use to get to your attachment pages. You show the “category” path, but you can also get there from a “parent post” path, a direct “post ID’ path and so on. I’m not sure what you mean by a “global variable“, but I don’t know if that would help much.

    Here are a couple of recent support topics that another MLA user used to share his approaches:

    pagination

    rewrite custom taxonomy slug

    I don’t pretend to understand all of the issues he raises and resolves, but you may find some guidance there.

    If you find any other good resources or a solution that works for you, please consider sharing it here; thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘slug and permalink’ is closed to new replies.