This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 2 replies, has 2 voices.
Last updated by henrikR-17 1 year, 10 months ago.
Assisted by: Long Nguyen.
Author | Posts |
---|---|
March 14, 2023 at 7:56 pm #13246329 | |
henrikR-17 |
Hi! WP has a very strange functionality: //* Display read more when excerpt is added.*// Note: I would also like to change it to a button. I have attached a screen shot from before I added the code snippet above. There you can see that WP has removed the "Read more"-link on a manual excerpt. I have not provided WPML debug info. I don't see the point. 🙂 |
March 15, 2023 at 4:57 am #13248045 | |
Long Nguyen Supporter
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Hi Henrik, Thank you for contacting WPML support, I'd be happy to help you with this issue. You need to wrap the string in a WordPress localization function like __() or _e() to make the string translatable. For example: $excerpt .= '<p class="read-more"><a href="'. get_permalink($post->ID) . '">' . __( 'Read more "', 'your-text-domain' ) . '</a></p>'; Then you can go to WPML > Theme and plugins localization > Scan for the strings in the theme or plugin and translate the string in WPML > String Translation. Please read more on the documentation https://developer.wordpress.org/themes/functionality/internationalization/ I would like to inform you that helping you with custom code, is out of the scope of WPML. If you are not able to accomplish this, I would recommend you contact one of our certified partners that will be more than happy to help you with this. In this link, you will find a list of our certified partners: https://wpml.org/contractors/ Look forward to your reply. |
March 15, 2023 at 9:33 am #13249517 | |
henrikR-17 |
I understand that this is a WP problem and not a WPML problem. Unfortunately I have the 'small' WPML Blog, where WPML String Translation is not included. So I will have to live with the lack of logic among WP developers... I have reported the problem here: https://core.trac.wordpress.org/ticket/57909 |