因此,我创建了一个带有自定义值的自定义帖子类型,并自定义了我的自定义帖子类型管理列。
You can see here how my custom post type is looking in admin panel.
正如你所见,我可以按标题排序所有帖子,我想知道我是否可以对所有栏目都这样做,如“信息”等。
有可能吗?
我使用此代码来显示我想要的列:
//display catalog products in nice list
add_action("manage_posts_custom_column", "catalog_custom_columns");
add_filter("manage_edit-catalog_columns", "catalog_edit_columns");
function catalog_edit_columns($columns){
$columns = array(
"cb" => "<input type=\\"checkbox\\" />",
"title" => "Product Title",
"description" => "Info",
"skills" => "Category",
"year" => "Price",
);
return $columns;
}
function catalog_custom_columns($column){
global $post;
switch ($column) {
case "description":
the_content();
break;
case "skills":
echo get_the_term_list($post->ID, \'atrakcijas\', \'\', \', \',\'\');
break;
case "year":
$custom = get_post_custom();
echo $custom["product_price"][0]; ?>Ls<?php
break;
}
}