• Resolved raqy

    (@raqy)


    Hi,

    I’ve just installed this plugin and I’m a bit overwhelmed with all the options it offers, so I thought I’d better ask here instead of reading so much help pages.

    Due to copyright issues with media with one of my clients, I’d had to temporarily disable some media from showing in frontend until validated as suitable, but need them to show in admin for review. I thought approaching this with defining an att. category or a custom field with the name Admin_only, and then write a code for the requested behavior in functions.php, using the plugin for bulk edit the media to have this category or field enabled/disabled for them.

    so I’d like to know how do I call a category or custom field from the code. by their slug?

    Or, if the plugin already have a solution to such a request included.

    Cheers!

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

    (@dglingren)

    Thanks for your question. I know that MLA has a lot of features and getting up to speed can be a chore.

    You want to “disable some media from showing in frontend“. The solution depends entirely on the method you use to show them. If you use a Gutenberg Image or Gallery block, the image(s) are hard-coded in the post/page content and difficult to suppress. If you use a shortcode such as MLA’s [mla_gellery] to compose the display, the solution can be easier, but it will vary depending on the shortcode you use.

    If you want to “write a code for the requested behavior in functions.php” you can use WordPress functions like these to retrieve the values:

    get_the_terms() – Function | Developer.WordPress.org

    get_post_meta() – Function | Developer.WordPress.org

    I hope that gets you started on a solution. If you need more help, additional information on your application will help me be more specific. I will leave this topic unresolved for now. Thanks for your interest in the plugin.

    Plugin Author David Lingren

    (@dglingren)

    It has been a month since my last post in this topic. I assume you have found a solution that works for your application.

    I am marking this topic resolved, but please update it if you still need help with it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.