• I’d like to change the text from Category Archives to somehting like Latest News.

    Is there a way to do this with CSS?

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • HI,

    please share url.

    Thread Starter jlelean

    (@jlelean)

    Hey jlelean,

    How are you doing today?

    This text should be possible to change by using your theme translation files. Please check the following link to see how to translate a theme.

    Hope this helps ??

    Cheers,
    Bojan

    I dont think with css it is possible, at least not very easily. You may want to go into the wordpress editor and look for a file called ‘category.php’ within that file you will see the line “Category Archives:” it may have to be changed there. This is the prefix you see on your page. The word “News” comes from the name of the category you have the posts under I believe.

    Be very carefully editing files within wordpress however. If you are not familiar with code and make the wrong change it could mess up your site. Not to mention editing files within a theme isnt best practice either. Before making changes to theme files directly, you should consider making a child theme.

    Hi,

    try add this code to your theme functions.php so it may solve your problem.

    
    add_filter( 'get_the_archive_title', function ($title) {
    
        if ( is_category() ) {
    
                $title = single_cat_title( '', false );
    
            } elseif ( is_tag() ) {
    
                $title = single_tag_title( '', false );
    
            } elseif ( is_author() ) {
    
                $title = '<span class="vcard">' . get_the_author() . '</span>' ;
    
            }
    
        return $title;
    
    });
    
    
    
    Thread Starter jlelean

    (@jlelean)

    Thanks for your answers

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change Category Archives text’ is closed to new replies.