Hi Adriano,
Apparently, I had to type the value name for the second one. This is how I fixed it:
add_filter('the_title', 'add_icon_to_title', 10, 2);
function add_icon_to_title( $title, $post_id ) {
if ( get_post_meta( $post_id, 'wpcf-type', true ) == premium ) {
$title = '<img src="http://s1.wsj.net/img/icon_key.png"> ' . $title;
}
return $title;
};
BUT, while the wp category view and the post view itself show the icon, plugins do not recognize it. What i mean is that, i have this plugin called "Special Recent Posts PRO Edition" to show posts from specific categories/tags etc. The plugin shows them nicely but it doesn't show the icon next to the titles. Would you know how to fix this?