- This topic has 8 replies, 2 voices, and was last updated 6 years, 3 months ago by tikaram.
-
AuthorPosts
-
January 1, 2018 at 8:25 pm #128962RonParticipant
Hi 🙂
I want not only the date in head of my articles, i want also the time. how i can realize it?
Ron
January 2, 2018 at 3:55 am #128988tikaramKeymaster@ron66 : It can be done by creating a child theme and customizing your site as desired. If you are comfortable with child theme customizations please let me know.
Regards,
TikaramJanuary 2, 2018 at 4:14 am #128990RonParticipantSorry, but its not the answer of this question!
In previous version it was simple to change:
inc/catchbase-core.php
$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() )
);
change in:
$time_string = sprintf( $time_string,
esc_attr( get_the_time( ‘G:i’ ) ),
esc_attr( get_the_date( ‘j F Y G:i’ ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_time( ‘G:i’ ) ),
esc_attr( get_the_modified_date( ‘j F Y G:i’ ) ),
esc_html( get_the_modified_date() )
);but its not possible in this version.
Ron
January 3, 2018 at 5:20 am #129049tikaramKeymaster@ron66 : I recommend you to create a child theme and modify the entry meta function with the following code. Please do not modify the parent theme directly, if you modify the parent theme the changes made will be lost in next theme update.
$time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date( 'F j, Y g:i a' ) ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date( 'F j, Y g:i a' ) ) );
Let me know if this resolves your issue.
Regards,
TikaramJanuary 3, 2018 at 5:49 am #129054RonParticipantthanks for the string, but in whitch file i have to change it?
Ron
January 3, 2018 at 6:21 am #129055RonParticipanti found already, thanks 🙂
but i have additional problem. the language of my theme should be german but its english. how i can change it?
Ron
January 4, 2018 at 10:52 am #129125tikaramKeymaster@ron66 :Login to your WordPress dashboard. Go to Settings => General . Select desired language from Site Language. Let me know if this resolves your issue.
Regards,
TikaramJanuary 4, 2018 at 6:47 pm #129155RonParticipantThanks for this info, but i know this and this is not the problem.
I head of my articles, is time and date in english, all other is in german. wordpress is in german language.Ron
January 5, 2018 at 6:23 am #129189 -
AuthorPosts
- The topic ‘Date and time in header of article’ is closed to new replies.