Hi there,
We added following filter to output entry meta of single posts and archive view:
add_filter( 'generate_header_entry_meta_items', function() {
return array(
'categories',
'author',
);
} );
This works fine so far!
Now we want to output the meta “date” only for one categories (ID 4651) posts and archive.
I tried something like this and set a higher priority to the snippet, but it won’t work:
add_filter( 'generate_header_entry_meta_items', function() {
if (is_single() && in_category('4651')) {
return array(
'categories',
'author',
'date',
);
}
} );
Any Ideas how to solve this?
Best regards!