• Resolved ernstwg

    (@ernstwg)


    Hey David.

    I have a question/issue regarding the usage of mla_term_list for attachment_category.
    [mla_term_list taxonomy=attachment_category mla_output=dropdown option_all_text option_all_value=all use_filters=true mla_option_value="{+slug+}" Minimum=1]
    [mla_gallery add_filters_to=any columns=3 size=large size=medium link=file option_all_value=all tax_operator=AND mla_style="experiment-default-basis" mla_markup="Bildersuche"]

    My imageA has three terms term1, term2, term3 assigned as attachment categories

    [A]
    If term1, term2, term3 are organised in WordPress in a simple list, the dropdown shows a list
    term1
    term2
    term3

    and
    selecting term1 shows imageA
    selecting term2 shows imageA
    selecting term3 shows imageA
    Everything is according to my expectations.

    [B]
    If term1, term2, term3 are organised in WordPress in hierarchical manner , the dropdown shows the appropriate structure list
    term1
    – term2
    — term3

    but
    selecting term1 doesn’t show imageA
    selecting term2 doesn’t show imageA
    selecting term3 shows imageA.

    My expectation would be as for case [A]. Every selection should show up for imageA.

    Cheers, Ernst Wilhelm

    • This topic was modified 5 years, 9 months ago by ernstwg.
    • This topic was modified 5 years, 9 months ago by ernstwg.
    • This topic was modified 5 years, 9 months ago by ernstwg.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter ernstwg

    (@ernstwg)

    [C] Variante
    The dropdown list can show a structure like this
    term1
    -> term2
    – -> term3
    -> term2_2
    -> term2_3

    but
    selecting term1 doesn’t show imageA
    selecting term2 doesn’t show imageA
    selecting term3 shows imageA.
    selecting term2_2 shows imageX.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your question and for including the details of your taxonomy structure. This looks like a continuation of your earlier topic:

    Search fields and presentation of results

    As I wrote in that topic, your “term2” search will succeed only if “term3” is the only child term below it. If there are any other terms beneath “term2” your item must have all of them assigned to be included in the results. In the same way your “term1” search will fail unless the item is assigned to all of the terms in the subtree. Click on the link above for more information.

    I am marking this topic resolved, but please update it if there are no other child terms in the term1 – term2 – term3 tree and you are still having a problem. Thanks for your continued interest in the plugin.

    Thread Starter ernstwg

    (@ernstwg)

    Good Morning David.

    Not sure if I get it.

    Image A has term1, term2, term3 as 3 att. categories
    Image B has term1, term2, term3 as 3 att. categories
    Image C has term1, term2, term3 as 3 att. categories
    Image D has term1, term2, term3 as 3 att. categories
    Image E has term1, term2, term3 as 3 att. categories

    Another subset of Images may have the following assignments
    Image F has term1, term2, term3_2 as 3 att. categories
    Image G has term1, term2, term3_2 as 3 att. categories
    Image H has term1, term2, term3_2 as 3 att. categories
    Image I has term1, term2, term3_2 as 3 att. categories
    Image J has term1, term2, term3_2 as 3 att. categories

    Another subset of Images may have the following assignments
    Image K has term1, term2_2 as 2 att. categories
    Image L has term1, term2_2 as 2 att. categories
    Image M has term1, term2_2 as 2 att. categories
    Image N has term1, term2_2 as 2 att. categories
    Image O has term1, term2_2 as 2 att. categories

    I think this meets the requirements to be included in any search result.

    Searching for term1 is expect to show Image A until O
    Searching for term2 is expect to show Image A until J
    Searching for term3 is expect to show Image A until E
    Searching for term3_2 is expect to show Image F until J
    Searching for term2_2 is expect to show Image K until O

    If I totally misunderstood, take my laughing as an apologize and have a glas of beer on me 🙂

    Plugin Author David Lingren

    (@dglingren)

    I regret the confusion; let me try an example. You wrote:

    [C] Variante
    The dropdown list can show a structure like this
    term1
    -> term2
    – -> term3
    -> term2_2
    -> term2_3

    I responded “If there are any other terms beneath “term2” your item must have all of them assigned to be included in the results.” So, for example, suppose your entire term hierarchy is:

    term1
    -> term2
    – -> term3
    – -> term3_2
    -> term2_2
    -> term2_3

    If you select “term2”, an item would have to be assigned to all three of of term2, term3 and term3_2 to be included.

    If you select “term1”, an item would have to be assigned to all six of term1, term2, term3, term3_2, term2_2 and term2_3 to be included.

    None of the “image A” through “image O” examples you give have all of the “children” assigned, so they are not included.

    I hope that makes sense – I am going to have a glass of beer now.

    Thread Starter ernstwg

    (@ernstwg)

    David. Okay. I am coming from Lightroom. There is no structure of categories, but there is a tree (folder) structure within the publishing services which makes sense. So I tried to mirror this structure into the category assignment of WordPress.

    Thanks for your patience. I hope beer was good.
    Ernst Wilhelm

    Plugin Author David Lingren

    (@dglingren)

    The beer is always good! As I wrote in the earlier topic:

    The best solution I can suggest is to set pad_counts=false and add tax_include_children=false to your [mla_gallery] shortcode. In my testing, this combination produced reasonable results.

    I hope that helps. Thanks for your understanding.

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

The topic ‘Hierarchical Structure of att. cat.’ is closed to new replies.