• ralphonz

    (@ralphonz)


    I’m making this post for a few reasons:

    1. It took me a long time to search for a solution
    2. I have a solution that may help others
    3. I believe it requires serious attention from wordpress developers

    I’m a long-time and very grateful user of wordpress. I’ve built a great many websites using it as a platform for all sorts of clients. However, this issue has been around as long as I’ve been using wordpress and needs to be taken seriously by the core developers.

    If you create a lot of hierarchal taxonomies, they are not displayed correctly in the checklist on either the post/page or add to menu screen. This is really, really really confusing if some of the sub taxonomies have the same title as you can’t distinguish one from the other.

    It also makes most people think that they haven’t nested their taxonomies correctly.

    The thing is the fix is very very desirable, and also very very easy! It’s just one little number:

    //fix the display of catalog categories in appearance->menu
    add_filter( 'get_terms_args', 'checklist_args', 10, 2 );
      function checklist_args( $args, $taxonomies )
      {
        $menu_taxonomies = array('shopp_category', 'page', 'category','post');
        if(in_array($taxonomies[0], $menu_taxonomies))
        {
          $args['number'] = 1000;
        }
        return $args;
      }

    Where this problem is at it’s worst is on e-commerce sites with a lot of categories.

    WordPress, please fix it! For the life of me I cannot see why you’d want it the way it is at the moment.

Viewing 10 replies - 1 through 10 (of 10 total)
  • I am @ this point. Since i am a bloody worpress noob i have a question. It looks like i have to insert this code into the function.php?
    Do i have to simply copy it in there?

    Man, I love you. I experienced this annoying bug just now, and your code fixed it instantly.

    @krauthaus:
    yes, put it in theme’s functions.php file.

    Thread Starter ralphonz

    (@ralphonz)

    Glad it helped 🙂

    You can change the taxonomies if you have custom ones on this line:

    $menu_taxonomies = array('custom_taxonomy', 'page', 'category','post');

    hey everyone,

    i have tried this in my installation and i still get pagination in my product categories under appearance>menus.

    I have even increased the number to 5000

    //fix the display of catalog categories in appearance->menu
    add_filter( 'get_terms_args', 'checklist_args', 10, 2 );
      function checklist_args( $args, $taxonomies )
      {
        $menu_taxonomies = array('shopp_category', 'page', 'category','post');
        if(in_array($taxonomies[0], $menu_taxonomies))
        {
          $args['number'] = 5000;
        }
        return $args;
      }

    can anyone suggest something?

    Thread Starter ralphonz

    (@ralphonz)

    i have tried this in my installation and i still get pagination in my product categories under appearance>menus.

    rosso711, what e-commerce plugin are you using for products and their categories?

    You need to enter the correct taxonomy into the $menu_taxonomies array like this:

    $menu_taxonomies = array('my_product_category_taxonomy');

    In my case above I added support for the shopp plugin categories, pages, post categories and posts.

    i am using woocommerce

    Thread Starter ralphonz

    (@ralphonz)

    then you need to add the taxonomy “product_cat” to the array.

    Here is a list of woo commerce taxonomies:
    http://docs.woothemes.com/document/installed-taxonomies-post-types/

    changed it but still pagination

    //fix the display of catalog categories in appearance->menu
    add_filter( 'get_terms_args', 'checklist_args', 10, 2 );
      function checklist_args( $args, $taxonomies )
      {
        $menu_taxonomies = array('product_cat', 'page', 'category','post');
        if(in_array($taxonomies[0], $menu_taxonomies))
        {
          $args['number'] = 5000;
        }
        return $args;
      }
    Thread Starter ralphonz

    (@ralphonz)

    hey rosso711,

    Not sure why that wouldn’t work, maybe try woo commerce support?

    OK i will thanks for the help

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Category checklist hierarchy is broken’ is closed to new replies.