admin管理员组文章数量:1430726
It doesn't work at all.
function owner_columns($columns)
{
$columns['views'] = 'Owner';
return $columns;
}
add_filter('manage_edit-listing_columns', 'owner_columns');
function custom_posts_table_content( $column_name, $post_id )
{
if( $column_name == 'Owner' )
{
echo 'Test';
}
}
add_action( 'manage_edit-listing_custom_column', 'custom_posts_table_content',10,2);
It doesn't work at all.
function owner_columns($columns)
{
$columns['views'] = 'Owner';
return $columns;
}
add_filter('manage_edit-listing_columns', 'owner_columns');
function custom_posts_table_content( $column_name, $post_id )
{
if( $column_name == 'Owner' )
{
echo 'Test';
}
}
add_action( 'manage_edit-listing_custom_column', 'custom_posts_table_content',10,2);
Share
Improve this question
edited May 23, 2019 at 11:51
fuxia♦
107k39 gold badges255 silver badges459 bronze badges
asked May 23, 2019 at 11:01
Lokesh DasLokesh Das
1013 bronze badges
2
- I have edited your question and formatted the code properly. I'm not sure why you removed the formatting. – Johansson Commented May 23, 2019 at 11:19
- thanks a lot, was a mistake – Lokesh Das Commented May 23, 2019 at 13:24
1 Answer
Reset to default 0You can also use Admin Columns plugin which makes your task easy.
If you want to go with custom solution > https://www.skyverge/blog/add-woocommerce-orders-list-column/
本文标签: How to set value in a custom column in wordpress
版权声明:本文标题:How to set value in a custom column in wordpress? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745470269a2659716.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论