Support

Account

Home Forums Backend Issues (wp-admin) Column from my field on post edit screen

Solving

Column from my field on post edit screen

  • Sorry, maybe i repeat this question. But i’m from Russia and can’t find answer on forum.

    I create field ‘price’ number type. And I want see it on every post at wp-admin/edit.php. I need new column on post edit screen.

    What’s the code to insert a file? And which file?

    Please help me.

  • Thanks. But nothing happens 🙂

    There examples for pages (not for posts). And when I try to edit my wp-includes/functions.php my WordPress crush every time 🙁

    I had WordPress 4.0, maybe need something special fo this?

    By the way I change field type to text.

  • Fuf. I understand how!

    Code add to “wp-content/themes/your_theme/functions.php”
    I get new column. But it empty! Help me wrote last string.

    function my_post_columns($columns)
    {
    	$columns = array(
    		'cb'	 	=> '<input type="checkbox" />',
    		'title' 	=> 'Title',
    		'price' 	=> 'Price',
    		'categories' 	=> 'Categories',
    		'tags'		=> 'Tags',
    		'author'	=> 'Author',
    		'date'		=> 'Date',
    	);
    	return $columns;
    }
    
    function my_custom_columns($column)
    {
    	global $post;
    	if($column == 'price')
    	{
    		/*I NEED LAST STRING HERE, PLEASE!*/
    	}
    }
    
    add_action("manage_post_custom_column", "my_custom_columns");
    add_filter("manage_edit-post_columns", "my_post_columns");;
Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Column from my field on post edit screen’ is closed to new replies.