Problems with: manage_${post_type}_posts_columns

Hi!

I have just started programming in WordPress with the ambition of creating something useful one day. But I’ve naturally run into problems right away, and now i have tried several solutions but im thinking im doing something fundamentally wrong since absolutely nothing is happening on my frontend (admin panel) though several alterations of the code.

Having created a plugin file with the following code:

/*
Plugin Name: Example Brand
Plugin URI: Example.com
Description: Lorum Ipsum
Author: Example Examplesson
Text Domain: Example location
*/
function crispynewcolumns( $columns ) {

$columns = array(
‘title’ => __(‘test title 1’),
);
return $columns;
}
add_filter( ‘manage_cri_creator_posts_column’ , ‘crispynewcolumns’ );

The function crispnewcolumns replaces the original ‘title’ with the string ‘test title 1’ in the custom post type “cri_creator”.

Code for cri_creator:

{“name”:”cri_creator”,”label”:”Constructors”,”singular_label”:”Constructor”,”description”:””,”public”:”false”,”publicly_queryable”:”true”,”show_ui”:”true”,”show_in_nav_menus”:”true”,”show_in_rest”:”false”,”rest_base”:””,”has_archive”:”false”,”has_archive_string”:””,”exclude_from_search”:”true”,”capability_type”:”post”,”hierarchical”:”false”,”rewrite”:”true”,”rewrite_slug”:””,”rewrite_withfront”:”true”,”query_var”:”true”,”query_var_slug”:””,”menu_position”:””,”show_in_menu”:”true”,”show_in_menu_string”:””,”menu_icon”:””,”supports”:[“none”],”taxonomies”:[],”labels”:{“menu_name”:”Constructor”,”all_items”:””,”add_new”:””,”add_new_item”:””,”edit_item”:””,”new_item”:””,”view_item”:””,”view_items”:””,”search_items”:””,”not_found”:””,”not_found_in_trash”:””,”parent_item_colon”:””,”featured_image”:””,”set_featured_image”:””,”remove_featured_image”:””,”use_featured_image”:””,”archives”:””,”insert_into_item”:””,”uploaded_to_this_item”:””,”filter_items_list”:””,”items_list_navigation”:””,”items_list”:””,”attributes”:””},”custom_supports”:””},”knark”:

My Setup is a WAMP localhost with php 5.6.3.5.

Both the plugin, custom post type and custom fields (AFC) shows up, but i got stuck here on the column manipulation. Should be simple enough – anyone have any ideas?

Read more here:: Problems with: manage_${post_type}_posts_columns

Leave a Reply

Your email address will not be published. Required fields are marked *