WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to change the title of manage_posts_custom_column (2 posts)

  1. JulyMoreira
    Member
    Posted 2 years ago #

    Hi,

    After i create the Custom Post Type, i wanted to organize the List Columns to show my houses. Because i'm doing a house system, to show 'n sell the buildings.
    So, in my Custom Post Type, i don't need title, editor 'n thumbnail, but, if u see the columns (that part that u can see every houses 'n edit, delete), 'n the manage_posts_custom_column structure, u need the "title" because it can show the $post->ID 'n show the manage options. But, i don't need the title 'n i want to change the title to another custom post. How can i do this?

    Ex:

    add_action("manage_posts_custom_column", "my_custom_columns");
    add_filter("manage_edit-house_columns", "my_house_columns");
    
    function my_house_columns($columns){
    	$columns = array(
    		"cb" => "<input type=\"checkbox\" />",
    		"title" => "Type", /* I WANT TO CHANGE THIS */
    		"region" => "Region",
    		"city" => "City",
    		"price" => "Price"
    	);
    	return $columns;
    }
    
    function my_custom_columns($column){
    	global $post;
    	$custom = get_post_custom($post->ID);
    	echo $column;
    	if ("ID" == $column) echo $post->ID; /*displays title, i want to change to display $custom["type"][0] but with the manage options*/
    	elseif ("region" == $column) echo $custom["region"][0];
    	elseif ("city" == $column) echo $custom["city"][0];
    	elseif ("price" == $column) echo $custom["price"][0];
    }

    If u don't understand, sorry, because i have bad english 'n in the brazilian forum nobody helped me :(

  2. brasofilo
    Member
    Posted 2 years ago #

    Yes, it's hard to understand, please mark this post as "Resolved", I'll take a look no fórum brasileiro:
    http://br.forums.wordpress.org/topic/mudar-conteudo-do-title-na-coluna-do-custom-post-type?replies=2

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.