WordPress.org

Ready to get started?Download WordPress

Forums

Changing the wording of "Posts" within the admin (2 posts)

  1. mozelch
    Member
    Posted 3 years ago #

    Theme: SimpleFolio 1.5

    Needing to change the wording of "Post" or "Posts" all across the admin. Some of my users have been confused by the difference between posts and pages, and I'll like to change the wording of "Posts" to "Articles" which I think they would find more friendly to understanding. I've been all over the wordpress files and have been unable to change what I need. I was able to change the wording in the menu, but it is still used in the heading when on the edit posts page. I ran across some information that used a filter in the functions.php file to make a similar change to other wording but do not know what to modify it to in order to change "Posts". The method shown was as follows:

    add_filter( 'register', 'mf_change_register_text' );
    function mf_change_register_text( $c ){
    	return str_replace('Site Admin', "Dashboard", $c);
    }

    Does anybody know how to make this work to change "Posts" or "Post" to "Articles" or "Article"?

    Thanks for your help.

  2. boldhand
    Member
    Posted 2 years ago #

    // hook the translation filters
    add_filter( 'gettext', 'change_post_to_article' );
    add_filter( 'ngettext', 'change_post_to_article' );

    function change_post_to_article( $translated ) {
    $translated = str_ireplace( 'Post', 'Article', $translated ); // ireplace is PHP5 only
    return $translated;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic