Blog Categories

This topic contains 5 replies, has 2 voices, and was last updated by  Kor 7 years, 1 month ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #371986

    Sieko Skrzypczak
    Expired Member
    Post count: 92

    Hi Team

    I want to know if it is possible to set a unique featured image for each Blog category. So instead of the default Blog picture showing up that each category has its own pic.

    Regards

    Sieko

    #371997

    Kor
    Moderator
    Post count: 16516

    Hi Sieko,

    I’ve just inspected the “Category” page and it looks like we can achieve this using custom CSS. Could you provide two category pages and I’ll show you how it’s done.

    Thanks!

    #372004

    Sieko Skrzypczak
    Expired Member
    Post count: 92
    #372049

    Kor
    Moderator
    Post count: 16516

    Hi Sieko,

    This is how you target the background images. Change the “.category-mia-von-scha-blog” to the category name as shown in this screenshot http://prntscr.com/estu5x

    
    
    .category-mia-von-scha-blog #ds-container > .featured-area .featured-img {
        background-image: url('https://www.coachingwarehouse.com/wp-content/uploads/2017/04/magic-SMALL.jpg')!important;
    }
    
    .category-thembi_hamag #ds-container > .featured-area .featured-img {
        background-image: url('https://www.coachingwarehouse.com/wp-content/uploads/2017/04/magic-SMALL.jpg')!important;
    }
    
    #372298

    Sieko Skrzypczak
    Expired Member
    Post count: 92

    Hey Kor

    Just got to this. Thanks Looks great !

    Is there a way we can also hide the word category ? https://www.coachingwarehouse.com/category/thembi_hama/

    So that it only displays the name Thembi Hama

    Regards

    Sieko

    #372383

    Kor
    Moderator
    Post count: 16516

    Hi Sieko,

    Please use the code below to hide it. Just insert into the code snippets plugin or the theme’s functions.php file.

    
    
    add_filter( 'get_the_archive_title', function ( $title ) {
    
        if( is_category() ) {
    
            $title = single_cat_title( '', false );
    
        }
    
        return $title;
    
    });
Viewing 6 posts - 1 through 6 (of 6 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket