• Resolved deepbevel

    (@deepbevel)


    this is what I have..

    custom taxonomy name (plural): My Gallery Categories

    (singular): My Gallery Category

    Custom Taxonomy Slug: “my-gallery-category”

    I’m using a custom post type for the taxonomy.

    I have mc taxonomy in functions.php:

    add_filter('mc_taxonomy', 'mc_filter_taxonomy');
    
    function mc_filter_taxonomy($taxonomy){
    
        if($taxonomy == 'category'){
            $taxonomy = 'my-gallery-category';
        }
    
        return $taxonomy;
    }

    and the meta box appears in the attachment editor. The category I created under “my gallery cateories” appears, The taxonomy assignment to the image saves. But I can’t get the shortcode to output.

    `[gallery my-gallery-category="botanical"]‘

    with “botanical” being the term name.

    Is there an example of how the code should look in mc taxonomy and in the shortcode when using a custom taxonomy? or am I doing it right?

    I know I’m close..please help!

    https://www.ads-software.com/extend/plugins/media-categories-2/

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter deepbevel

    (@deepbevel)

    Thanks, I got that far, but I’ve hit a wall with the params, doesn’t seem to be a way to get a post author name to display with the image.

    I thought that if the image is uploaded to a post, it would have that association, even if the image is not pulled from the post.

    At one point I thought I had it but it was showing the author of the post that was also accidently using the same media category as the image.

    Just to experiment i tried it will all the posts, but
    this produced an odd result, if I changed the author for one post in a media category, all posts in that media category changed to that same author.

    I tried 2 different functions that were supposed to make the attachement and post author the same. But neither worked for me.

    Plugin Author Eddie Moya

    (@eddiemoya)

    Why dont you just get the post first, and then find the associated images? That way you’ll already have the post and its post author.

    Thread Starter deepbevel

    (@deepbevel)

    thanks, I’ve been thinking the same. I wouldn’t know how to set it up from scratch but I’ll find something to get me going. All examples greatly appreciated..

    Plugin Author Eddie Moya

    (@eddiemoya)

    Thread Starter deepbevel

    (@deepbevel)

    That worked for me, thanks!

    The only limitation is the post has to be assigned to the same media-category as the image in order to show the author link.

    Still, it allows images attached to a post to appear grouped in categories and include post meta, like the author posts link.

    The goal:
    A multi user art blog, each user with their own gallery-posts. Very much out of the box except for the admin area is customized per user role.

    In addition to appearing in the users own post, each image in the post can appear in one or more of several community-galleries.
    All images by all users which are categorized “portrait” appear in the portrait media-category, ect..

    Then, each image has a link back to the author posts page.

    So again, the only bummer is each media category selected for the images must also be selected for the post.

    Still, the post can appear with it’s gallery in a category which is not a media-category. So I’ll call it progress..

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘[Plugin: Media Categories] example of use with custom taxonomy’ is closed to new replies.