Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #119789
    Ulrich
    Participant

    Hello,

    Is there a way to influence wording and look of category?

    The theme creates this for example “Kategorie: Rettung der letzten Adria-Delfine” I could do without the word “category” and would like to use a <h2> or something like this for example for the category description. Tried a lot but nothing works…

    Ulrich

    #119814
    Mahesh
    Participant

    @dsm: For this, you’ll need to create a child theme. You can find more on creating child theme HERE. Then, in you child theme’s functions.php add the following codes.

    add_filter( 'get_the_archive_title', function ( $title ) {
    
        if( is_category() ) {
    
            $title = single_cat_title( '', false );
    
        }
    
        return $title;
    
    });

    Regards,
    Mahesh

    #119937
    Ulrich
    Participant

    Hi Mahesh,

    Thank you :). I’ll try taht …., sounds a bit complictated but we’ll see…
    Regards
    Ulrich

    #119954
    Ulrich
    Participant

    @Mahesh:
    worked just fine using the child theme that CT provides, great and simple!

    Now would it also be possible to fromat each category title like into a <h2></h2>?

    Regards and many thanks for this fabulous support!
    Ulrich

    #119971
    Mahesh
    Participant

    @dsm: For that, copy archive.php to your child theme folder. Then replace h1 with h2 in line 21 of archive.php. So it displays as following:
    the_archive_title( '<h2 class="page-title">', '</h2>' );

    Regards,
    Mahesh

    #119991
    Ulrich
    Participant

    @Mahesh: Thanks again, that was easy, but id doesn’t do much, category / archive titles still look the same like “Artenschutz”, no format visible…, maybe I should wait till the site is published so you can see what I mean?

    Regards
    Ulrich

    #120008
    Mahesh
    Participant

    @dsm: Seems the CSS format is in .page-header so its overriding <h2> tags format. Please add the following CSS in Dashboard=> Appearance=> Customize

    .page-header {
        font-size: 20px;
    }

    Note: Please adjust font-size as required.

    Regards,
    Mahesh

    #120039
    Ulrich
    Participant

    @Mahesh: Fantastic, works right away, just what I wanted 🙂 🙂

    Super Support!
    Regards
    Ulrich

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘formatting / changing look and wording of category appearence’ is closed to new replies.