Hide "Featured" category term

Hello. I’m hoping you can help. I am working on my 5th website using X-Pro; but, I understand if this request is out of scope for providing me with support on this issue (?)

I’m using “The Grid” extension that was available for download with X-Pro to create a page showing all of the Posts. As you can see in the capture attached, some posts contain the “Featured” Category, along with the primary Post category (Tech, Finance, etc.). I am trying to hide this “Featured” item label, so it does not appear in the grid.

I’ve tried every possible CSS selector to isolate and hide just the Featured category, but I cannot get it to work. I’ve also tried using the code below in the functions.php file of the Child Theme, but this code is only applicable to the Home Page, which is not the page I’m using to display my posts. I’ve tried changing the page name “home” (in the PHP below) to the actual page name (News Articles) using the permalink name “news-articles” but that does not work either.

I don’t know PHP, so I’m at a bit of a loss here. This is literally the last thing I need to do to release the website to my client to go live. Any assistance you can provide will be appreciated.

PHP Code:
function excludeCat($query) {
if ( $query->is_home ) {
$query->set(‘cat’, ‘-2’);
}
return $query;
}
add_filter(‘pre_get_posts’, ‘exclude_category_home’);

Hello @mcaravaglia,

Thank you for your detailed post. If you just want to hide feature category label and not the post associated with it, I think it is not possible with custom CSS alone. This is because on the list, the category might appear on different places.

Usually in CSS we can use first child selector. This is only useful if the feature category label is sure to be showing as the very first category which is not.

The alternative is a customization of the term list layer of the skin. This part though is outside the scope of our support. Thank you for understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.