how to change “posted by” words

This can MOST LIKELY be done with the get_text filter. Here’s an example (and then some caveats):

function my_theme_text_switcher( $translations, $text, $domain ) {

    if ( $domain == 'my-theme' && $text == 'posted by' ) {
        $translations = __( 'YOUR TEXT HERE', 'my-theme' );
    }

    if ( $domain == 'my-theme' && $translations == 'on' ) {
        $translations = __( 'YOUR TEXT HERE', 'my-theme' );
    }

    return $translations; } 
add_filter( 'gettext', 'my_theme_text_switcher', 10, 3 );

Now the caveats:

  • Go to your theme and find the single.php template and look for the post markup where those words are output. IF they are output with proper internationalization then the snippet above will work. It’ll look something like this: __('post by', 'my-theme');
  • If that is there correctly, look for that second part the “my-theme” part. That is your theme’s translation domain. You need to use that in the function correctly.
  • IF, on the other hand, that text is hard-coded in your template files, then you can override it with a child theme. Read about Child Themeing here: https://mediatemple.net/blog/tips/best-practice-why-and-how-to-create-a-child-theme-in-wordpress/