Dates not translated in Blog Listing page
This topic contains 9 replies, has 2 voices, and was last updated by Gianni Dal Mas 10 years, 2 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
November 27, 2014 at 12:05 am #22792
Hi,
I can’t get the date translated in the Blog Listing page, (month name is in spanish, but with english format) and there’s also a problem in the “Author” field (showing a link instead of the Author name).Both issues are not happening in the Blog details page, as you can see here.
I don’t know if the translating issue is the same for the Event addon, cause I don’t get the spanish date either (in this case, the month name is in english, and the date format is in spanish). Even page here.
Please advice,
thanks,
gianniNovember 27, 2014 at 12:07 am #22796This reply has been marked as private.November 27, 2014 at 5:05 pm #22855Hi Gianni,
that has nothing to do with GeoDirectory. That’s a WordPress thing.
Go to Settings >> General >> Date Format.
Thanks
November 27, 2014 at 5:41 pm #22861Hi Paolo,
You’re right, and my common Sense told me to check the WP core before posting the issue here. But the Date doesn’t translate in the Event addon too (other parts are traslating corrently in the geodirevents-es_ES).
If you could give it just a quick look I’d really appreciate it, it’s not urgent.
Best regards,
GianniNovember 27, 2014 at 9:20 pm #22894hi,
my bad, I didn’t know the blog template had been modified and I think it was to allow translation.
You would have to copy the file blog-page.php in your child theme.
Look for :
get_the_time(__( 'F jS, Y', GEODIRECTORY_FRAMEWORK ))
and change it to:
get_the_time(__( 'd-m-y', GEODIRECTORY_FRAMEWORK ))
Or whatever suits you best.
Thx
November 28, 2014 at 3:41 pm #22943Hi Paolo,
thanks for your guidance, and sorry if I keep posting even if you marked the topic as resolved.
I managed to copy the page “archive.php” on my child theme (I couldn’t find the blog-page.php), and used a peace of code I copied from the “page.php” in order to get the date format as set in the general settings (if I ever have to change it in the future):get_the_time(get_option('date_format'))
The result seems ok, but I’d like you to confirm the sentence is right.
About the “Author name displayed as a full link“, I don’t find what code to use instead of this:
get_author_posts_url( get_the_author_meta( 'ID' ) )
It should be displaying the Author name with a link to the author archives… not a full link as in the picture.
About the date translation in the Event addon, there’s a reply from Stiofan in this topic from October 23rd: do you know if the new version will include this fix?
Thanks,
gianniNovember 28, 2014 at 4:47 pm #22954Hi again,
thought you were using GDF Theme… I guess you are not, because blog-page.php is in there. Sorry if I assumed.
Yes, this is correct code:
get_the_time(get_option('date_format'))
.
For the author link there is a wp API function that can be used within the loop:
http://codex.wordpress.org/Function_Reference/the_author_link
Let me know,
p.s. I set this as solved (should have set this as “not a support question”), because you’re asking to assist with wordpress related issues, even though we don’t provide support for anything, but GeoDirectory here.
https://wpgeodirectory.com/support-policy/
You should ask support for wordpress related issues on wordpress.org forums.
November 28, 2014 at 6:56 pm #22965Hi Paolo,
I’m using the GDF and his child theme… but inside the GDF theme folder I couldn’t find any blog-page.php … if you’re referring to the “page.php”, I did use a code inside that page and copy/pasted it to the Archive.php. Please advise if the blog-page.php is hiding inside another folder.About the Autor link, I’ll do my best to find a solution on my own, but please understand that if I’m using the GDF with default settings, I shouldn’t get that kind of error 🙁 If you still think that’s a GD user responsibility to fix that link inside the GD blog page, I will always disagree with you, without offense 😉
About the support policy, I’m sincerely trying to follow your rules, for this reason I can’t understand why you ignored my question about the Event date translation issue. If it’s matter of starting a new topic, please advise…
Regards,
gianniNovember 28, 2014 at 7:56 pm #22969Hi Gianni,
my bad again, I apologized.
You are right, there is no blog-page.php in GDF. I probably add it myself in my test website.
For the author
<?php the_author_link(); ?>
should work no problem. You can see their example.
I’ll ask Stiofan to add a proper blog template in next GDF release.
If I can spare some time today I’ll create one and pass it on.
For the event issue, yes please always use the right section of the forum. You need to post in the event addon support forum.
Thx
November 28, 2014 at 8:28 pm #22973Hi Paolo,
no problem at all, I understand you guys are busy with the next update of the plugins.
I already had used that code in order to get the author name, but it doesn’t come with the link to the author posts page… It’s beyond my actual knowledge (limited to copy/paste codes trough trial and errors 🙂 ), so I’ll wait for the proper blog template in next GDF release.
Thanks and have a nice weekend,
gianni -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket