Support » Plugin: Media Library Assistant » mla_gallery category= not limiting to the category.

  • Resolved LVRuss


    Just started using the plugin and it’s going to really make doing what I want to do a lot easier. I’m building a genealogy site ( using the rootsPersona plugin. All has been going well but for some reason “mla_gallery category=” with “post_parent=current” is showing all the images with the current page as parent, not just those in the specified category.
    More detailed: I have a page for Census reports ( and a category for each census year
    Name Slug Pages
    1790 Census 1790-census 0
    1800 Census 1800-census 0
    1810 Census 1810-census 0
    I’m using the WP UI plugin with tabs for each census year.
    [wptabtitle] 1790[/wptabtitle]
    [mla_gallery category=’1790-census’┬ápost_parent=current]
    [wptabtitle] 1800[/wptabtitle]
    [mla_gallery category=’1800-census’┬ápost_parent=current]
    [wptabtitle] 1810[/wptabtitle]

    I’m using the Mantra theme, the Post Tags and Categories for Pages plug in to add categories to all the “page” posts (no “post” post are being used), I’m not using tags (yet.)
    Am I doing something wrong? Could another plug in be causing the problem?

Viewing 6 replies - 1 through 6 (of 6 total)
  • One other thing just noticed. Bulk edit to add parent page results in “no change detected” message and doesn’t add parent. Bulk edit to add category works great.

    Ok found the solution. Not very clear on the documentation page but you have to include “tax_operator=AND” otherwise it apparently defaults to “OR”. Apparently quotes around the category SLUG are optional also.

    Plugin Author David Lingren


    Thanks for the good words about the plugin and for this question. Thanks especially for the link to your site, which is fascinating!

    I completed some testing before I saw your last two updates. I also had trouble with the Bulk edit action and discovered that it only modifies the first item on the list. You have found an MLA bug, which I will fix in my next release; thank you!

    The tax_operator fix you found doesn’t work for the reason you think and, in fact, only works sometimes (it didn’t work for me).

    The real solution is buried in the WordPress Codex documentation for the WP Query Class, in Section 5.2 Category Parameters.

    Categories and Tags go way back in WordPress, and the syntax for them is different from the more recent custom taxonomies. In your case, the parameter should be category_name='1790-census'. That’s how you specify a slug/name in the Categories taxonomy.

    The category_name parameter works for me and is the official way to accomplish your goal. Give it a try and let me know if you have any further problems or questions.

    I will leave this topic unresolved until I fix the bug you found in the Bulk edit action. Thanks again for your interest.

    Thanks for the rapid reply. I’m going to try the “mysterious” category_name requirement now and will let you know how it works out.

    It works! Thanks again.

    Plugin Author David Lingren


    That’s great – thanks for confirming my suggested solution. I’m going to mark this issue resolved. Please let me know if you have any problems or further questions.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘mla_gallery category= not limiting to the category.’ is closed to new replies.