Support » Fixing WordPress » How add column in page posts medias

  • wpjudy


    Hi I want to add a column which displays the users roles in this content

    This is my code:

    add_filter('manage_users_columns', array(&$this,'myusers'));
    		add_action('manage_users_custom_column',  array(&$this,'function_column'), 10, 3);
    		add_filter( 'group_user_sortable_columns', array(&$this,'column_sortable' ));
    		add_filter( 'request', array(&$this,'column_orderby' ));
                    add_filter('manage_posts_columns', array(&$this,'myusers'));
    		add_action('manage_posts_column_column',  'function_column', 10, 3);
                    add_filter('manage_pages_columns', array(&$this,'myusers'));
    		add_action('manage_pages_custom_column',  array(&$this,'function_column'), 10, 3);
                    add_filter( 'manage_media_columns',  array(&$this,'myusers'));
                    add_action( 'manage_media_custom_column', array(&$this,'function_column'), 10, 3);   
    	function myusers($columns) {
    		$columns['myusers'] = __('Views', 'myusers');
    		return $columns;
    	function function_column( $value, $columnz, $ids ) {
            if ( 'myusers' != $columnze )
               return $value;
            $vars = get_user_meta($ids, 'myusers', TRUE);
            return $this->My_displays[$vars];

    In users it works fine but in pages and media I have ‘Missing argument 3 for aclass::function_column’

    Thank you

  • The topic ‘How add column in page posts medias’ is closed to new replies.