Jump to content
Sign in to follow this  
thibaud

Change of wording below post titles

Recommended Posts

thibaud

Hello, Below my post titles there is a "by Thib on 23 June 2011", where can I modify the "by", "on", etc ? I want to put the French version. Same for the wording "XX comments", where can I change it ? Thanks !

Share this post


Link to post
Share on other sites
catrina

Are you using a translation plugin? If so, are those the only words that aren't getting translated? If not, you do you have the child theme, PlatformBase, enabled?


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
thibaud

No, i'm not using a translation plugin, and yes, I have PlatformBase enabled. Where can i change this wording ?

Share this post


Link to post
Share on other sites
marmaristasarim

Hello, I am requesting the same thing please for a single language website. However, on another website I am using WPML and in the string search this did not appear so that I could translate it. I do have base enable. So I guess I am asking for two things on the same matter. Thank you in advance. :)

Share this post


Link to post
Share on other sites
catrina

Since you have PlatformBase enabled, you can create copies of template files from PlatformPro to PlatformBase and edit them there in order to change the text. The files you'll need to copy over and edit are section.comments.php and section.postsinfo.php


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
marmaristasarim

Thank you for your reply :) I have checked those files and did not see any words "by", "on" so I checked all the other section....php files in the same folder and did not see it either. Am I missing it? I even did a word search :)

Share this post


Link to post
Share on other sites
thibaud

Hi Catrina, I can't find where to modify these things... Looking at template.postloop.php, it seeems that I need to look into this function and modify it : pagelines_get_post_metabar(); Where do I modify this function ?

Share this post


Link to post
Share on other sites
marmaristasarim

Hello Catrina It's so funny and I must be stupid LOL! I can't find them in those two files either ( comments.php and template.postloop.php). I did a word search in DW and nothing came up. :(:)

Share this post


Link to post
Share on other sites
kastelic

The function is in platformpro/includes/library.templates.php starting at line 345.

Share this post


Link to post
Share on other sites
thibaud

Hi Kastelic, I have modified the file "library.templates.php", but now my blog does not load and I have an error : Parse error: syntax error, unexpected '}' in /homez.429/thibinsp/www/blog/wp-content/themes/platformpro/includes/library.templates.php on line 482 I have uploaded back the original file, and... the same error appears !!! I have not changed anything, i really don't understand why i get such error ?! Any idea ? Your quick reply will be appreciated...

Share this post


Link to post
Share on other sites
thibaud

I can't even log into my admin panel anymore, and get the same error... How is that possible ???

Share this post


Link to post
Share on other sites
kastelic

Did you have the base child theme activated? If so, perhaps you need to overwrite the copy of library.templates.php in there ( you did make a copy I hope.).

Share this post


Link to post
Share on other sites
thibaud

Ok, I managed to re-upload all the "includes" directory, back from the original platform pro files. I did the same changes (translation) again, and now it works... I have no idea what happened ! Kastelic : yes, i have child theme (platformbase) activated. I don't understand, am I supposed to copy the original file "library.templates.php" in the child section ? And then only modify this copied file under child theme ? Where exactly do I have to copy this file ? Thanks for your support.

Share this post


Link to post
Share on other sites
kastelic

Any file that you want to edit, you can drag that file into the platformbase directory, thus overriding the copy in the main platformpro folder. You have to copy the same folder structure with it (so in this case, the includes folder (not all the files in it, just the folder) ).

Share this post


Link to post
Share on other sites
thibaud

Ok, I did copy the structure + the said file in the platformbase directory, however it does not seem to be taken into account. Do I have to name it a certain way, or add something in the code at the beginning ? And I don't see this child file in the editor, is it normal ? Thanks for your help.

Share this post


Link to post
Share on other sites
thibaud

Bonus question : where do i change the wording "Comments" under each post title ? It does not seem to be in the same file.

Share this post


Link to post
Share on other sites
catrina

Are you referring to the comments link under the post titles in single post pages?


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
Simon

Please do not edit the core files in includes directory. There are filters to edit the output of these functions, thats why they are there. pagelines_post_metabar is the filter you need.

	add_filter('pagelines_post_metabar','my_custom_function');
	function my_custom_function($meta){
	
	//$meta variable holds the meta info, so change it here...
	
	
	
	 // Now send it back to the filter, to be printed on page.
	  return $meta;
	}
	

Share this post


Link to post
Share on other sites
thibaud

catrina : yes. How can I change the wording "XX COMMENTS" into its French equivalent. Where do I change it ? pross : sorry, but i don't understand. Where do I have to add this "filter" ? What variable do I need to change ? I'm surprised (frustrated) that there is no easy way to change these simple things...

Share this post


Link to post
Share on other sites
catrina

You'll need to add this filter to the bottom of your functions.php file in PlatformBase. You need to make sure PlatformBase is enabled first before adding the filter (don't add the code to the functions.php file in PlatformPro).


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
thibaud

Ok, thanks catrina, I will try and let you know.

Share this post


Link to post
Share on other sites
thibaud

Sorry, i don't understand... Can you tell me exactly what code i need to insert in the filter in function.php in PlatformBase... Below is the original function, i just need to change the wording "On" and "By"... Thanks for your support. add_filter('pagelines_post_metabar', 'do_shortcode', 20); function pagelines_get_post_metabar( $format = '' ) { $metabar = ''; if ( is_page() ) return; // don't do post-info on pages if( $format == 'clip'){ $metabar .= sprintf( '%s [post_date] ', __('On','pagelines') ); $metabar .= sprintf( '%s [post_author_posts_link] ', __('By','pagelines') ); } else { if(pagelines_option('byline_author')){ $metabar .= sprintf( '%s [post_author_posts_link] ', __('By','pagelines') ); } if(pagelines_option('byline_date')){ $metabar .= sprintf( '%s [post_date] ', __('On','pagelines') ); } if(pagelines_option('byline_comments')){ $metabar .= '· [post_comments] '; } if(pagelines_option('byline_categories')){ $metabar .= sprintf( '· %s [post_categories]', __('In','pagelines') ); } } $metabar .= ' [post_edit]'; printf( '

%s
', apply_filters('pagelines_post_metabar', $metabar, $format) ); }

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×