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:


My Setup is a WAMP localhost with php

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?

  • 1
    OK, but what exactly are you trying to achieve? – Krzysiek Dróżdż Jun 8 '18 at 16:59
  • Hi! Krzysiek Dróżdż, my goal is to display custom field data (from AFC) in the admin columns on the custom post type later on. At the moment though im just trying to manipulate the title of standard one to say "test title 1". Can't even get that working at this moment, so i figured i will crash and burn if i do anything more advanced than that. – CnapBack Jun 8 '18 at 17:23
  • if that's a copy / paste of your code, you have a typo- the filter is manage_cri_creator_posts_columns, plural. – Milo Jun 8 '18 at 17:58

You have misspelled the filter name. There is an "s" lacking at the end. The correct is manage_cri_creator_posts_columns.

As a suggestion, I'd say that it is better to manipulate the existing array rather than creating a complete new one. Might not be your case, but its a good idea to avoid conflicting with other plugins that could be doing something in this very same filter.

So, for instance, just to change the title label, it would be better if you did:

function crispynewcolumns( $columns ) {

    $columns['title'] = __('test title 1');
    return $columns;

add_filter( 'manage_cri_creator_posts_columns' , 'crispynewcolumns' );

Hope it helped. Here is the link to the documentation: https://codex.wordpress.org/Plugin_API/Filter_Reference/manage_$post_type_posts_columns

  • Thanks a lot Leo! :) Managed to solve it now, the problem was a combination of: 1. The spelling mistake you described, and 2. I was not aware that i had to manually activate my own plugin, so my code was never even loaded. Palm touched face. – CnapBack Jun 9 '18 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.