0

How can one change this to 'Topics'?

I'm trying to find a way of displaying 'Topics' rather than 'Categories' and so far not being very successful.

I tried this:

function translate_category($translated) { 


$translated = str_ireplace('Category', 'Topic', $translated);
  return $translated; 
}

function translate_categories($translated) { 
  $translated = str_ireplace('Categories', 'Topics', $translated);
  return $translated; 
}

But it doesn't seem to work. Any suggestions would be welcome.

8
  • not clear question for me Commented Dec 1, 2018 at 10:28
  • I added a screenshot tomato the question clearer. Commented Dec 1, 2018 at 10:51
  • this meta box heading? Commented Dec 1, 2018 at 10:56
  • function replace_text($text) { $text1 = str_replace('Category', 'Topic', $text1); $text2 = str_replace('Categories', 'Topics', $text2); return $text; } add_filter('int', 'replace_text'); Commented Dec 1, 2018 at 11:12
  • add this function.php file Commented Dec 1, 2018 at 11:13

1 Answer 1

0

Changing category base prefix is quite simple in WordPress.

You need to visit Settings » Permalinks page and scroll down to the ‘Optional’ section.

changing category base prefix

2
  • That only changes the slug, not the name. 'Categories' will continue to appear as the description even if you rename the slug to 'topics'. Commented Dec 1, 2018 at 10:46
  • you must edit theme and find place this code and change word of Categories Commented Dec 3, 2018 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.