hi,
can I know what do u mean by
my WP is hosted?
I’m not sure but u can try using this Plugin
and, link to plugin is Loco Translate
Please follow this: https://codex.wordpress.org/Customizing_the_Read_More
i think this piece of code will help you:
Modify The Read More Link Text
Adding this code to your functions file enables you to customize the read more link text.
add_filter( 'the_content_more_link', 'modify_read_more_link' );
function modify_read_more_link() {
return '<a class="more-link" href="' . get_permalink() . '">Your Read More Link Text</a>';
}
Code reference: https://developer.wordpress.org/reference/hooks/the_content_more_link/
Thread Starter
pat07
(@pat07)
Thanks for the pointers
Loco Translate is installed but it does not have the translation for read more
I am trying to find how I can add it, but not sure i understand it.
It is not my site, I am helping and do not want to break everything by trial and error (would do if it was mine 😉
By hosted, I mean i have no access to disk, I access the site only through the web, so anything that has to do with touching source code or files is impossible for me.
I have no access to a .php file to add any code.
What annoys me is that it was perfect before the upgrade, so something got lost, but I am also sure nobody has done any code modifications before
Thread Starter
pat07
(@pat07)
Ok one step ahead. I managed to find the Read More in the .pot of my theme, I merge the .po with the fr-FR.po (using Loco plugin ), and translated the missing sentences I needed.
I Save, the plugin says all is well, files have been generated
and now ? I don’t see the translated words.
Is there something else to do ? as I say my only access is through the WP admin interface.
Any idea of what else I should do ? thanks a lot.
P.S. -> If you don’t have access to your files through web application or FTP (or SFTP) then You can try editing the code by going to Appearence-> Theme Editor
Thread Starter
pat07
(@pat07)
I have gotten a step more.
I read the codex many times and found out this sentence:
Although the_content() is usually called from the template with a standard text as described above, it is possible to have an individual text for certain posts. In the visual editor, simply write <!–more Your custom text –>.
Do I understand well that if I put <!–more Lire la suite –>
I should see Lire la suite instead of Read more ?
It doesn’t work, so can it be overridden by the theme ? Or am I missing something else ?
thanks a lot for the help, I am quite new to wordpress.
Try Finding “Read More” in your functions.php and edit it if found
Thread Starter
pat07
(@pat07)
I would like to not change the php files, but I am afraid it will be the only solution
What I do not understand, is why I cannot implement the option described in the codex
Although the_content() is usually called from the template with a standard text as described above, it is possible to have an individual text for certain posts. In the visual editor, simply write <!–more Your custom text –>.
that would also give me the possibility of modifying the wording depending on the page
Any idea ?
thanks