Hey @Peter_Fae,
Since your plugin removes the featured image, there is no way for it to be displayed in the recent posts.
The simplest solution for this is to hide the featured image of your Academy single post using CSS. Here’s the code for it.
.single-post .category-academy .entry-thumb {
display: none;
}
You can also remove the featured image in a single post and for a certain category by overriding the featured image function which can be found in wp-content\themes\x\framework\functions\global\featured.php. For your case, you will need to change this part of the code switch ( is_singular() )
to switch ( is_singular() && is_category( 'academy' ) )
. The code inside the switch function are WordPress Conditionals. For more details, please see https://developer.wordpress.org/reference/functions/is_category/. Here’s the sample code to be placed in functions.php.
function x_featured_image( $cropped = '' ) {
$stack = x_get_stack();
$fullwidth = ( in_array( 'x-full-width-active', get_body_class() ) ) ? true : false;
if ( has_post_thumbnail() ) {
if ( $cropped == 'cropped' ) {
if ( $fullwidth ) {
$thumb = get_the_post_thumbnail( NULL, 'entry-cropped-fullwidth', NULL );
} else {
$thumb = get_the_post_thumbnail( NULL, 'entry-cropped', NULL );
}
} else {
if ( $fullwidth ) {
$thumb = get_the_post_thumbnail( NULL, 'entry-fullwidth', NULL );
} else {
$thumb = get_the_post_thumbnail( NULL, 'entry', NULL );
}
}
switch ( is_singular() && is_category( 'academy' ) ) {
case true:
printf( '<div class="entry-thumb">%s</div>', $thumb );
break;
case false:
printf( '<a href="%1$s" class="entry-thumb" title="%2$s">%3$s</a>',
esc_url( get_permalink() ),
esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ),
$thumb
);
break;
}
}
}
Please note that we are using custom code to achieve what you need. The code given serves only as a guide and might break in the future. With that said, issues that might arise from the use of the code and any enhancements would be outside the scope of our support. Please see our Terms of Use for more details.
Hope that helps.