Title: Replace &#8220;Category:&#8221; string
Last modified: May 15, 2020

---

# Replace “Category:” string

 *  [pier31](https://wordpress.org/support/users/pier31/)
 * (@pier31)
 * [6 years ago](https://wordpress.org/support/topic/replace-category-string/)
 * Hey there, I’d like to replace “Category:” string in the page
    I have used this
   code using “content” CSS’s property
 *     ```
       /* category page ATTIVITA */
       .category-1 .page-title {visibility: hidden;}
       .category-1 .page-title:before {visibility: visible;content: 'Attività';}
       ```
   
 * I’m using Nineteenth Theme.
    Is it better to use PHP to do it automatically?
 * Thanks in advice, Pier31
    -  This topic was modified 6 years ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Moved to Fixing WordPress, this is not an Everything else WordPress
      topic
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Freplace-category-string%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [simpleliving](https://wordpress.org/support/users/simpleliving/)
 * (@simpleliving)
 * [6 years ago](https://wordpress.org/support/topic/replace-category-string/#post-12842487)
 * Hi Pier31,
    You can replace/modify the page title programmatically so that each
   category archive page will render the category title exactly as you would like.
 * In the 2019 theme, look at the <header> tag in the archive.php template. The 
   function `the_archive_title()` is responsible for rendering the page title as
   Category: Activities.
 * Try replacing `the_archive_title()` with `single_cat_title()`, this should render
   Activities as the page title, without the Category: prefix.
 * You will want to remove the CSS declarations you provided in your question if
   you use the `single_cat_title()` function.
 * Good luck!
 * Function reference: [https://developer.wordpress.org/reference/functions/single_cat_title/](https://developer.wordpress.org/reference/functions/single_cat_title/)

Viewing 1 replies (of 1 total)

The topic ‘Replace “Category:” string’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [simpleliving](https://wordpress.org/support/users/simpleliving/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/replace-category-string/#post-12842487)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
