WordPress.org

Ready to get started?Download WordPress

Forums

Indenting Subcategories in the Post Editor (6 posts)

  1. minnellium
    Member
    Posted 2 years ago #

    Am | the only person who thinks this is a bug? If you select one or two subcategories or sub-subcategories whilst editing a post, it's clear from the category hierarchy that you can see which subcategories you've selected.

    However, when going in to re-edit or update a post, all the categories or subcategories you have selected have been moved in the sidebar to the top of the 'categories'

    e.g.

    Categories

    Cheese
    -- French
    -- German
    -- Greek
    -- English
    Meat
    -- French
    -- German
    -- Greek
    -- English

    Then if the post is 'in' the categories

    • Cheese > French
      AND
    • Meat > French

    The category 'sidebar' in the post editor shows the VERY confusing

    French
    French
    Cheese
    -- German
    -- Greek
    -- English
    Meat
    -- German
    -- Greek
    -- English

    If You have the following sort of subcategory structure, it's a NIGHTMARE but I can't see a way round this. AMazed that I can't find anything on this annoyance in the Codex or support... but happy for you to prove me wrong...

  2. borantula
    Member
    Posted 2 years ago #

    i'm dealing with the same problem
    i found the solution but its in admin files and i couldn't manage to hook it

    there's a function called wp_terms_checklist
    See here
    And here

    in $defaults there's an option called checked_ontop and its true. try and make it false and you'll see the problem is solved(i tried it with a custom taxonomy but it should work on normal categories as well).

    but my problem is how to hook it from my functions.php to make checked_ontop false?? because i dont want to update this everytime i upgrade the core

  3. borantula
    Member
    Posted 2 years ago #

    :) great!!! thanks for the quick reply
    this does the trick but this should be easier. he copied and rewrite entire meta box.
    i was looking for a way to hook on wp_terms_checklist function

  4. Yeah, the other fix I found was a very complicated functions hack. Sometimes the plugin is easier ;)

  5. minnellium
    Member
    Posted 2 years ago #

    Thanks so much people - you're all great. Like I said in the original post, I have no idea why this isn't a core release rather than a plugin... who'd want it any other way?!

Topic Closed

This topic has been closed to new replies.

About this Topic