• I have a very interesting bug when updating to WP 5.0.3
    I have a (dutch) website with a Custom Post Type called Column.
    When I update to WordPress 5.0.3 it auto translates the Custom Post Type in the backend, the breadcrumbs in the front end and the post type nav in the bottom from Column to Kolom (dutch word for column). The slug however stays the same.

    I have made some duplicates of the website to test it out and the problem is definitely in the update. When I update the website and set the language to English it changes it back to Column.

    The correct version (WP 5.0.2):
    https://factor70live.roxtest.nl/column/column-goed-bedoeld/

    The incorrect version (WP 5.0.3):
    https://factor70.roxtest.nl/column/column-goed-bedoeld/

    I would obviously love to be able to update the website, keep the backend in Dutch but keep the correct term ‘Column’ and I have no idea where to start to fix this.
    Does anybody else have any clue how to tackle this? Thanks in advance!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Without seeing the code you wrote to make the CPT, the best I can guess is you named it __( 'Column' ) and WordPress is properly translating it.

    Thread Starter roxanneallard

    (@roxanneallard)

    Hi Mika,
    Thanks for your fast response.
    The code I used to make the CPT is:

    // Column
    register_post_type( ‘Column’,
    array(
    ‘labels’ => array(
    ‘name’ => __( ‘Column’ ),
    ‘singular_name’ => __( ‘Column’ )
    ),
    ‘menu_icon’ => ‘dashicons-welcome-widgets-menus’,
    ‘public’ => true,
    ‘publicly_queryable’ => true,
    ‘has_archive’ => true,
    ‘supports’ => array(‘title’,’editor’,’thumbnail’),
    )
    );

    Is this not the correct way to do it?
    I made 9 other CPT’s the exact same way and none of those are being translated.
    Do you know a better way to do this?

    Moderator bcworkz

    (@bcworkz)

    If you don’t want the word “Column” translated on non-English sites, do not define post type labels with the __() function.

    'labels' => array(
          'name' => 'Column',
          'singular_name' => 'Column',
        ),
    Thread Starter roxanneallard

    (@roxanneallard)

    Well, that was easier than I thought.
    I’ve always used the same copied and pasted code and never ran into a problem.
    Thanks so much for your help!

    Moderator bcworkz

    (@bcworkz)

    Happy to help. Proper translation through the default text domain had been a long standing bug that was recently fixed.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP 5.0.3. auto translates Custom Post Type (unwanted)’ is closed to new replies.