• Resolved leost

    (@leost)


    Hello,

    First of all, awesome plugin!

    I have 685 itens on my gallery and I need to add an Att. category to only 120 of them. Those images are featured images from posts from a custom category. I am working on a solution using MySQL and already filtered the imagens out.

    I was thinking about just updating the wp_term_relationships table manually, since I know the posts IDs and the Att. category ID but I fear it’s not that simple.

    On the image edit screen, when we check an Att. category and hit Update, does the plugin just update the wp_term_relationships or does it do a lot more in the background?

    Thank you!

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

    (@dglingren)

    Thanks for the positive feedback on the plugin and for your question.

    By the “image edit screen” I assume you mean the Media/Edit Media screen; is that right? On this screen all of the taxonomy maintenance functions are provided by WordPress, not MLA. MLA does have similar features in the Media/Assistant Quick and Bulk Edit areas (and elsewhere). MLA uses WordPress API functions such as wp_set_post_terms() to update taxonomy terms. MLA always uses the highest-level functions possible to maintain compatibility with WordPress. For example, wp_set_post_terms() updates the in-memory cache of taxonomy terms when changes are made. I believe that adding a row to the wp_term_relationships table might be sufficient but I urge you to poke around the WordPress source code for yourself.

    If you have some PHP skills you might look at MLA’s “MLA Parent WP_Query Example” plugin and adapt it or make something like it for your task.

    I am marking this topic resolved, but please update it if you have problems or further questions regarding the above suggestions. Thanks for your interest in the plugin.

    Thread Starter leost

    (@leost)

    I have some PHP skills indeed, so I will try your suggestion and check the “MLA Parent WP_Query Example”.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Set Att. Categories to multiple images’ is closed to new replies.