- This topic has 7 replies, 2 voices, and was last updated 6 years, 9 months ago by Ulrich.
-
AuthorPosts
-
July 29, 2017 at 7:10 am #119789UlrichParticipant
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
July 30, 2017 at 5:14 am #119814MaheshKeymaster@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,
MaheshAugust 1, 2017 at 9:02 am #119937UlrichParticipantHi Mahesh,
Thank you :). I’ll try taht …., sounds a bit complictated but we’ll see…
Regards
UlrichAugust 1, 2017 at 12:14 pm #119954UlrichParticipant@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!
UlrichAugust 2, 2017 at 3:21 am #119971MaheshKeymaster@dsm: For that, copy
archive.php
to your child theme folder. Then replace h1 with h2 in line 21 ofarchive.php
. So it displays as following:
the_archive_title( '<h2 class="page-title">', '</h2>' );
Regards,
MaheshAugust 2, 2017 at 11:35 am #119991UlrichParticipant@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
UlrichAugust 2, 2017 at 11:56 pm #120008MaheshKeymaster@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,
MaheshAugust 3, 2017 at 11:54 am #120039 -
AuthorPosts
- The topic ‘formatting / changing look and wording of category appearence’ is closed to new replies.