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 – vikrant zilpe Dec 1 '18 at 10:28
  • I added a screenshot tomato the question clearer. – Donald Jenkins Dec 1 '18 at 10:51
  • this meta box heading? – vikrant zilpe Dec 1 '18 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'); – vikrant zilpe Dec 1 '18 at 11:12
  • add this function.php file – vikrant zilpe Dec 1 '18 at 11:13
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'. – Donald Jenkins Dec 1 '18 at 10:46
  • you must edit theme and find place this code and change word of Categories – Seyed Abbas Seyedi Dec 3 '18 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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