Forums

Insert Category of my Custom Post in Admin columns (2 posts)

  1. Web.Hard
    Member
    Posted 3 months ago #

    Good morning,

    I need to put in admin columns the categories of my Custom Post so they can be arranged in alphabetical order as in normal posts, have even got the title "Categories" is displayed on the first line, but the categories of posts do not appear, it is written "Uncategorized", because the categories are not categories, are taxonomies from what i understand.

    This is part of the code to inserted in functions.php:

    function change_columns( $cols ) {
      $cols = array(
        'cb'       => '<input type="checkbox" />',
        'title'      => __( 'Título',      'trans' ),
        'author' => __( 'Autor', 'trans' ),
        'categories'     => __( 'Categorias', 'trans' ),
        'tags' => __( 'Tags', 'trans' ),
        'comments' => __( 'Comentários', 'trans' ),
        'date' => __( 'Data', 'trans' ),
        'thumbnail' => __( 'Miniatura', 'trans' ),
      );
      return $cols;
    }

    The problem is that instead of 'categories' i should insert 'anuncio_category' which is the taxonomy of my custom post, how can i do that? The same thing happens with the tags.

    Thank you all.

  2. MCWebdesign
    Member
    Posted 1 month ago #

    Hi i think this post by Yoast should help you. I am just working through it at the moment.

    Matt

Reply

You must log in to post.

About this Topic