WordPress.org

Ready to get started?Download WordPress

Forums

Media Library Categories
[resolved] Media categories show up in the actual blog categories (10 posts)

  1. LogoLogics
    Member
    Posted 6 months ago #

    Hi Jeffrey,

    I am using your premium plugin in an website with a blog for the first time.

    Seems that the categories I create for the media library, now also show up in the blog post categories which is not good.

    In the media library I create specific categories for my eyes only, like category with all the layout images, etc etc.

    I dont want them to show up in my actual blog posts ofcource.
    How can this be fixed please?

    Thx,
    Annie

    https://wordpress.org/plugins/wp-media-library-categories/

  2. jeffrey-wp
    Member
    Plugin Author

    Posted 6 months ago #

    Hi Annie,

    By default the media library uses the same categories as the posts and pages do in WordPress. If you wan't to have the media library to use it one categories you have to create them manually.

    There is a taxonomy filter in my plugin. You can use it as in this example:

    /**
     * Change the taxonomy of the categories in the media library
     * http://codex.wordpress.org/Function_Reference/add_filter
     */
    add_filter( 'wpmediacategory_taxonomy', function(){ return 'my_media_categories'; } ); //requires PHP 5.3 or newer

    my_media_categories is the name of the taxonomy / category you've created manually.

    Also check out version 1.4.2 of my Premium plugin. You can get it at your download page from CodeCanyon.

  3. LogoLogics
    Member
    Posted 6 months ago #

    Hi Jeffrey,

    Thx, but I am not sure what to put where exactly?

    Do I put your code in my functions.php of the theme or where?

    Where do I create that categorie manually?
    In the media categories just create one there and all the others need to be sub categories of that one or how does this work?

    Do I put the intire code in there or just a piece of it, and if so what piece do I use please?

    PS. I still can not upload the new version in my dashboard like most of the other plugins. I Always need to upload it manually by FTP.
    Is there a way to make it possible we get updates in the dasboard when there is one?

    Thx,
    Annie

  4. jeffrey-wp
    Member
    Plugin Author

    Posted 6 months ago #

    You can put the add_filter in the functions.php from your theme (or child theme).

    There are different ways to add a taxonomy manually. For example:

    /*
     * Add a new taxonomy
     * http://codex.wordpress.org/Function_Reference/register_taxonomy
     */
    register_taxonomy( 'my_media_categories', null );

    P.S. Im working on a better update system for the premium version.

  5. LogoLogics
    Member
    Posted 6 months ago #

    Hi Jeffrey,

    I am still not sure what exacatly I need to insert into my child theme's functions.php.

    Presume I create a categorie called: my media categories and add exactly this code to my function.php ?

    /*
    * Add a new taxonomy
    * http://codex.wordpress.org/Function_Reference/register_taxonomy
    */
    register_taxonomy( 'my_media_categories', null );

    Then all the categories I create as a sub category of "my media categories" wont show up in the list, is that correct?

    Is there a chance you would add this to your premium plugin so we can determine what shows up in the list and what not?

    For now I found this plugin which still works fine, although it has not been updated for 2 years now:

    http://wordpress.org/plugins/easy-categories-management-widget/

    Ofcourse it would be even better if you could integrate this into your own plugin?

    At first I only used it in a webshop that is not using the blog part.
    Now I use it in a website with blog and it is just not acceptable to have the image categories showing up there ofcourse.

    Great that you are working on an update function!
    I installed the newest version, but can not seem to find the changes you made?

    Thx,
    Annie

  6. jeffrey-wp
    Member
    Plugin Author

    Posted 6 months ago #

    I'm glad you've found a solution for now. I will try to make it easier to manage the 'custom' categories in a future version of my plugin.

  7. LogoLogics
    Member
    Posted 6 months ago #

    That would be awesome thank you!

    Annie

  8. LogoLogics
    Member
    Posted 5 months ago #

    Hi Jeffrey,

    I just updated to 1.4.4 and in the changelog you say it now is capable of filtering the post categories from the image categories.

    Yet them it links to how to add code?
    Is this fixed without having to dive into code in the premium version now or do I still have to add code in functions.php please?

    Thx,
    Annie

  9. jeffrey-wp
    Member
    Plugin Author

    Posted 5 months ago #

    The option is not yet available for the premium version, this needs some more work (because the premium version has some extra options).

    You still have to add the code to the functions.php of your theme or child-theme.

  10. LogoLogics
    Member
    Posted 5 months ago #

    Hi Jeffrey.

    Ok thanks!

    Annie

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.