Blog Category Pages Show Full Posts But Exclude One Category

I’ve included the below code to my enfold child theme-functions.php file to make my blogs category pages not show the full article but show the excerpt that then links to the full article.

add_filter(‘avf_blog_style’,’avia_change_archive_blog_layout’, 10, 2);
function avia_change_archive_blog_layout($layout, $context){
if($context == ‘archive’) $layout = ‘single-big’;
return $layout;
}

add_filter( ‘post-format-standard’, ‘avia_category_content_filter’, 15, 1);
function avia_category_content_filter($current_post)
{
if(!is_single())
{
$current_post[‘content’] = get_the_excerpt();
$current_post[‘content’] .= ‘<div class=”read-more-link”><a
href=”‘.get_permalink().'” class=”more-link”>’.__(‘Read
more’,’avia_framework’).'<span class=”more-link-arrow”> &rarr;</span></a>
</div>’;
}
return $current_post;
}

However, I need this snippet of code to EXCLUDE one category. I have a category named “C. Notes” that I still need to show the full article instead of the excerpt that then links to the full article.

As you can see, this function targets “is_single” meaning all single blog posts, but I need this function to target all single blog posts EXCEPT those in one particular category.

The category is named C. Notes, has a slug named c-notes, and has an ID of 1147

Please help!

Read more here:: Blog Category Pages Show Full Posts But Exclude One Category

Leave a Reply

Your email address will not be published. Required fields are marked *