• Resolved jhdean

    (@jhdean)


    Hello David,

    I’m trying to add the functionality to exclude images with the phrase “-prd” in the file name in the following gallery.

    Is this possible? I wasn’t able to find an explanation in the documentation.

    Thanks,
    Jeff

    `[mla_gallery columns=2?mla_search_fields=title s=”{+page_title+}” ?sentence=true ?link=”file” size=small mla_caption=” ” meta_key=”image_sort_name” orderby=meta_value order=”ASC”?tax_query=”array(array(‘taxonomy’=>’post_tag’,’field’=>’slug’,’terms’=>’process’,’operator’=>’NOT IN’),’relation’=>’AND’)”]

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

    (@dglingren)

    Good to hear from you again, and thanks for your long-standing interest in the plugin.

    I haven’t been able to build and test an example, but the immediate solution that occurs to me would be to create a custom field for the file name or the [+name_only+] portion of the file name and then add a meta_query to the shortcode for the exclusion you want.

    You might be able to use the existing custom field WordPress uses to record attached files. Have a look at this earlier topic for more information:

    Sort Files by filename

    For your application I don’t think adding the year and month to the file name would be an issue.

    I will leave this topic unresolved for now in case you need more specific guidance.

    Plugin Author David Lingren

    (@dglingren)

    It has been over 3 months since the 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 are still having trouble with excluding images by file name.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Gallery: exclude images by file name’ is closed to new replies.