- This topic has 8 replies, 2 voices, and was last updated 7 years, 11 months ago by
makintour.
-
AuthorPosts
-
September 15, 2016 at 8:45 pm #99428
makintour
ParticipantHi. Cause english not native language for my visitors, i try to translate each element in your theme. Maybe i am blind but i can’t find where I could change text in entry-meta class.
I want to change text “Posted on”. Pls help me!September 16, 2016 at 10:02 am #99457Mahesh
Participant@makintour: The string is in file
inc/template-tags.php
line 86. You can either modify this line (NOT RECOMMENDED – as you’ll lose it on theme update). Or create a child theme and add following code in your child theme’sfunctions.php
. You can find more details on creating child theme HERE.function fabulous_fluid_posted_on() { $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); $posted_on = sprintf( esc_html_x( 'Posted on %s', 'post date', 'fabulous-fluid-pro' ), '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>' ); $byline = sprintf( esc_html_x( 'by %s', 'post author', 'fabulous-fluid-pro' ), '<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>' ); echo '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>'; // WPCS: XSS OK. }
Note: Please change Posted on to your desired text in the above code.
Regards,
MaheshSeptember 19, 2016 at 12:42 pm #99642makintour
ParticipantThank you Mahesh! Very helpful info for me.
September 19, 2016 at 4:38 pm #99660Mahesh
Participant@makintour: Thank you for your appreciation. Have a nice day!
Regards,
MaheshSeptember 20, 2016 at 6:34 pm #99767makintour
ParticipantMahesh, can you help explain how can I use child theme or another way for create multilingual site?
I’m trying to use WPGlobus plugin and it work fine. But how to do multilingual fabulous fluid for this?September 20, 2016 at 8:22 pm #99774makintour
ParticipantThank you and sorry, i am already found solution for question above. Your theme is awesome and is translation ready 🙂
September 21, 2016 at 12:52 pm #99814Mahesh
Participant@makintour: Glad to know you found the solution. Have a nice day! And thank you too, we really appreciate it.
Regards,
MaheshSeptember 22, 2016 at 4:42 pm #99968makintour
ParticipantYeah. Hi again!
Another problem with problem from start. Arguments ‘Posted on’ missed in .po/.pot files so I cant translate it and another items which not in this files.
So i tried to add this params by myself and compile .mo, and even tried to change source file (template-tags.php) using this manual.
But its not help for me.September 22, 2016 at 4:45 pm #99969makintour
ParticipantFirst solution with child theme not help me, cause I’am creating multilingual site (russian and ukrainan) wia plugin Globus and I need translation functional now.
Maybe you can create small translation ready update for fabulous fluid pro theme and add this args in template for translation:msgid “Posted on %s”
msgstr “”msgid “by %s”
msgstr “”Thank you!
-
AuthorPosts
- The topic ‘How to edit text in entry-meta (Posted on etc.)’ is closed to new replies.