I need to change "Last updated on" and "Posted on" From the code below to another words in arabic.
This code is part of the "template-tags.php" file which is part of the WordPress theme files
I just tried replacing the words but it didn't work for me
It just looks like this"����������"
<?php if ( get_theme_mod('show_post_date', '1') == 1 ) : ?>
<div class="entry-date"><i class="fa fa-clock-o"></i><span >
<?php $u_time = get_the_time('U');
$u_modified_time = get_the_modified_time('U');
if ($u_modified_time >= $u_time + 60) {
echo "Last updated on "; // here
the_modified_time('Y-m-d');
}
else {echo "Posted on "; // here
the_time('Y-m-d');
} ?>
My Answer:
two words in a WordPress theme to Arabic words.
To do this, you can follow these steps:
1. Log in to your WordPress dashboard.
2. Go to Appearance > Editor.
3. In the Editor, find the file where the words you want to change are located. This could be in the theme's functions.php file, header.php file, or any other relevant file.
4. Use the search function (Ctrl + F) to find the words you want to change.
5. Replace the English words with their Arabic equivalents.
6. Click on the Update File button to save your changes.
Make sure to backup your theme files before making any changes to avoid any potential issues.
Rate this post
4 of 5 based on 6079 votesComments