0

I am struggling to find some words that are appearing in the Wordpress (or theme). In particular I cannot find where the word 'by' is, as I need to replcae this word. This is the word 'by' that appears in the posts at the top of each post "date BY author". I need to replace the word 'by' for another word, but cannot find its location.

I have tried the following in settings.php of the theme, but it does not work:

function hpm_replace_text($translated_text) {
    switch ($translated_text) {

        case 'by' : // write the original string here
            $translated_text = 'por'; // make a change to it
            break;

    }

    return $translated_text;
}
add_filter('gettext', 'hpm_replace_text');

There are also other words, such as 'Categories', 'Replies' which I need to replace but cannot find where they are located.

Can anyone help? Thanks.

1 Answer 1

1

These would be in your template. The Template File Hierarchy can be found here, and can help locate the specific template for the page you are looking at: https://developer.wordpress.org/themes/basics/template-hierarchy/

The plugin, Show Current Plugin, can also help: https://wordpress.org/plugins/show-current-template/

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.