Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #99428
    makintour
    Participant

    Hi. 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!

    #99457
    Mahesh
    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’s functions.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,
    Mahesh

    #99642
    makintour
    Participant

    Thank you Mahesh! Very helpful info for me.

    #99660
    Mahesh
    Participant

    @makintour: Thank you for your appreciation. Have a nice day!

    Regards,
    Mahesh

    #99767
    makintour
    Participant

    Mahesh, 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?

    #99774
    makintour
    Participant

    Thank you and sorry, i am already found solution for question above. Your theme is awesome and is translation ready 🙂

    #99814
    Mahesh
    Participant

    @makintour: Glad to know you found the solution. Have a nice day! And thank you too, we really appreciate it.

    Regards,
    Mahesh

    #99968
    makintour
    Participant

    Yeah. 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.

    #99969
    makintour
    Participant

    First 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!

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘How to edit text in entry-meta (Posted on etc.)’ is closed to new replies.