Quantcast
Channel: Nederland » Recent Posts
Viewing all articles
Browse latest Browse all 30043

cootje16 on "Probleem manage_custom_posts"

$
0
0

Beste Wordpressers,

Ik zit al een tijdje te stoeien met een probleem. Ik krijg namelijk geen output in mijn column. Het gaat om de volgende code:

add_filter('manage_edit-nwsbrf_columns', 'nwsbrf_set_custom_edit_category_nieuwsbrief_columns');
add_action('manage_nwsbrf_posts_custom_column', 'nwsbrf_custom_category_nieuwsbrief_column', 10, 2);

function nwsbrf_set_custom_edit_category_nieuwsbrief_columns($columns) {

	return $columns
	+ array('categories' => __('Categorie'));

}

function nwsbrf_custom_category_nieuwsbrief_column($column, $post_id) {

$getcategory = $wpdb->get_results( $wpdb->prepare("SELECT * FROM wp_nwsbrf_couple INNER JOIN wp_nwsbrf_categories WHERE wp_nwsbrf_couple.category_id = wp_nwsbrf_categories.category_id AND ID = '".mysql_real_escape_string($post_id)."'") );

	switch ($column) {
		case 'categories': echo 'test';
	break;
	}
}

De code displayed tot nu toe alleen een kolom, genaamd 'Categorie'. Het zou tevens 'test' moeten outputten in de kolom. Dat laatste gebeurt alleen niet. Misschien dat jullie mij uit de brand kunnen helpen?


Viewing all articles
Browse latest Browse all 30043

Trending Articles