WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Add Custom Taxonomy as a column in "All Posts" (4 posts)

  1. silkenhut
    Member
    Posted 2 years ago #

    Add Custom Taxonomy as a column in "All Posts"

    Hi, I recently added custom taxonomies to my blog and I have started replacing my tags as I categorize them more via the taxonomies. However, it is hard for me to keep track of the posts that doesn't have taxonomies because I can't see them in my admin dashboard.
    I have to view each post one by one to check if they have taxonomies.

    Is there a way to add columns to the "All post" where it would show the custom taxonomy per post similar to categories and tags columns?
    wp-admin/edit.php

    I have tried searching in google and copy-pasting code which resulted in errors in my admin panel :(

    thank you.

  2. jkovis
    Member
    Posted 2 years ago #

    Something like the code in this pastebin should work.

    I basically followed this blog post and simplified it. You'll need to replace all the instances of 'my_custom_taxonomy' and 'my_custom_taxonomy_slug' to suit your needs.

    I have tried searching in google and copy-pasting code which resulted in
    errors in my admin panel :(

    -- it's impossible to help debug this if you don't tell us what errors you receive

  3. silkenhut
    Member
    Posted 2 years ago #

    hello, i'm sorry I browsed through different websites and I wasn't able to take note of their errors.

    I tried your code and it works! This is what I needed.

    Thank you very much!

    btw, for each taxonomy, i will just copy the contents of the first case?

    case 'my_custom_taxonomy':
    //copy everything here to... 
    
    case 'my next taxonomy':
    //here
  4. silkenhut
    Member
    Posted 2 years ago #

    update: yes, it does work. everything looks ok now. thank you very much once again!

Topic Closed

This topic has been closed to new replies.

About this Topic