• On an archives-page the page is give as a title: Tag: <tag-name> of Category: <category-name>.
    These titles are translated into Dutch by nl_NL.po / nl_NL.mo in wp-content/languages/
    But what I want, is to remove the “Tag: “- en “Category: ” part.
    I tried successfully buy changing the translation of nl-NL.po / nl_NL.mo.
    Problem is, that this file is updated by WordPress very regular. So I made a translation for my child-theme (catch-kathmandu-child-nl_NL.po and .mo) in wp-content/languages/themes, but that doesn’t work. The translation in wp-content/languages/nl_NL.mo are still be?ng used.
    I think to try to change the function get_the_archive_title() in wp-includes/general-template.php, but wonder where I should place the changed file (containing only this changed function) in my child theme to prevend overwriting with uodates of WordPress (not the theme).
    Any ideas?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter rkleinha

    (@rkleinha)

    I also tried to force the theme to get the translations from the child theme’s folder by adding the following lines to the functions.php in the child theme folder:

    // Load translation files from your child theme instead of the parent theme
    function my_child_theme_locale() {
    load_child_theme_textdomain( ‘total’, get_stylesheet_directory() . ‘/languages’ );
    }
    add_action( ‘after_setup_theme’, ‘my_child_theme_locale’ );

    but it doesn’t seem to work. Of is there something wrong with this code?

    Thread Starter rkleinha

    (@rkleinha)

    I tried the following ?orrection’:

    // Load translation files from your child theme instead of the parent theme
    function my_child_theme_locale() {
    load_child_theme_textdomain( ‘catch-kathmandu-child’, get_stylesheet_directory() . ‘/languages’ );
    }
    add_action( ‘after_setup_theme’, ‘my_child_theme_locale’ );

    but it also doesn’t seem to work. What can be wrong with this code?

    • This reply was modified 4 years, 5 months ago by rkleinha.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Tag: or Category: in Archive-title’ is closed to new replies.