[resolved] Request: Something to change the Post Format names (4 posts)

  1. Jaja..
    Posted 5 years ago #

    Hello smart coding people..

    Just curious..

    Would it cost much time for you guys to build a plugin or i prefer a functions.php (add_filter) hook to rename the basic Post Format names.

    Clean out of the box in WP we have 3 options to pick from.
    - Standard
    - Aside
    - Gallery

    I would like an option to rename those three options into something that fits better to the layout attached to them.
    Something like..

    - Layout wide
    - Layout small
    - Layout center

    I don care if WP prints .gallery or .aside into the source code.
    It just for a better looking admin.


  2. Jaja..
    Posted 5 years ago #

    Oww BTW

    I have found this code..
    This works for only one Post Format (name change)

    But i can duplicate it to change more Post Format names.

    function rename_post_formats( $safe_text ) {
        if ( $safe_text == 'Aside' )
            return 'Tip';
        return $safe_text;
    add_filter( 'esc_html', 'rename_post_formats' );
    //rename Aside in posts list table
    function live_rename_formats() {
        global $current_screen;
        if ( $current_screen->id == 'edit-post' ) { ?>
            <script type="text/javascript">
            jQuery('document').ready(function() {
                jQuery("span.post-state-format").each(function() {
                    if ( jQuery(this).text() == "Aside" )
    <?php }
    add_action('admin_head', 'live_rename_formats');
  3. Post Formats aren't extendable in the same way Custom Post Types are. You're not meant to change them that way.

  4. Jaja..
    Posted 5 years ago #


    Thanks for the help.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.