WordPress change 'Posts' to 'Articles'


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. // Change 'Posts' to 'Articles'
  2. // via bit.ly/smag-wp31tips
  3. // hook the translation filters
  4. add_filter( 'gettext', 'change_post_to_article' );
  5. add_filter( 'ngettext', 'change_post_to_article' );
  6.  
  7. function change_post_to_article( $translated ) {
  8. $translated = str_ireplace( 'Post', 'Article', $translated ); // ireplace is PHP5 only
  9. return $translated;
  10. }

URL: http://bit.ly/smag-wp31tips

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.