Support » Plugin: Frontier Post » change text – Sorry, you do not have any posts (yet)

  • Resolved LucyTech

    (@lucytech)


    How do I change the text
    Sorry, you do not have any posts (yet)
    on the my-posts page?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author finnj

    (@finnj)

    Only way is to change translation – If your WP is in english, you can create an English translation, with just one sentence translated

    LucyTech

    (@lucytech)

    could you explain how to do this without using a plugin?
    Is there a way to use this function?
    translate( $text, $domain )
    Thanks

    Plugin Author finnj

    (@finnj)

    You can use PO Edit to create new translations based on frontier-post.pot which is located in the language sub directory of Frontier Post

    Alternative can be to add this to your functions.php:

    
    function fp_change_text_strings( $translated_text, $text, $domain ) {
    	
    	// Limit to Frontier Post for performance reasons
    	if ($domain == "frontier-post")
    		{
    		switch ( $translated_text ) 
    			{
    		
    			case 'Sorry, you do not have any posts (yet)' :
    				$translated_text = "No Posts";
    				break;
    		
    			}
    		}
    	return $translated_text;
    }
    add_filter( 'gettext', 'fp_change_text_strings', 20, 3 );
    
    
    • This reply was modified 2 years ago by finnj.
    LucyTech

    (@lucytech)

    Thank you so much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘change text – Sorry, you do not have any posts (yet)’ is closed to new replies.