I am having troubles with my Worpress post date. As the picture shows, I can publish the post with 01-Jan etc. I only want to post the month with text, and no numbers. Any suggestions?
You mentioned in the comments that the date on the front end was displayed wrong. Therefore, I suggest you look at the PHP source that is creating that page.
It's possible that the date format has been explicitly set in there, especially if you are using a non-custom theme, so the format under 'Settings -> General' could be ignored.
Related
I have just updated the post on my blog changed its category and now its showing the current date instead of publishing date. How to display the publish date instead of the revision/update one.
ED website
A password to access is letmein Thank you in advance.
I think you must keep in a database field the initial date, and then you must modify the template in order to display the initial date not the last. But if you go to the Gui that can edited the post and you know the date you can update manual the date for a specific post. In Wp you can put feature or older date to a post.
I display a list of my recently posted custom posts. However i would like to display when it was posted with the get_the_date() function.
I would like the date to be displayed like this.
If it is posted today: just the time it was posted (18:24)
If it was posted this year: The day + month (22 may)
If it was posted before the current year: The normal date (2016-10-11)
Is this possible to do?
Thanks in advance! /Molle
Yes, this is possible to do, provided you can write PHP yourself within your WordPress page or create your own template to take advantage of said PHP.
If you have the date of the post loaded in a variable already (assuming you do), then you can use your own logic (if, else is statements as literally stated by your question) to parse out the day and year.
Read more on date formatting to get the desired output you wish:
http://php.net/manual/en/datetime.formats.date.php
I have a events page using a custom wp_query so that I can split post into upcoming events and past events. To do this I need the date to be stored in the database Y/m/d format but would like it to display on the front ends d/m/y. Any help on how I should do this, I could reverse it with jquery but there might be a better way?
thanks
That page is probably using the_date() function.
If so, modify it using format parameter to something like this:
the_date('d/m/Y');
Check also this Codex page about formatting the date and time.
Our wordpress blog (currently version 3.4.2) has an external process that inserts posts directly into the database from a third party. I don't have the ability to change that, so don't bother telling me it shouldn't be done that way. I CAN change the insert statements though.
The posts show up and everything looks fine except that the RSS feed shows an invalid year (expecting 2013, instead getting -0001) in the date field:
<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
The post_date field in the wp_posts table for the post shows the correct date, and on the site the post has the right date. It shows up in the right place chronologically.
If I manually edit the post using the control panel and change the date even by just one second and re-publish the post then it fixes the feed.
This problem causes the RSS feed to not validate, and it's breaking other things. Help!
There are 4 dates stored for each WP post: Post_date, post_date_gmt, post_modified and post_modified_gmt.
I recommend you to insert the same date for both post_date and post_modified and see if it works.
I have some problems while making my own theme for wordpress. Currently I'm making a comment system that was updated in wordpress 2.7 (you now that one with treated comments).
I'm following the codex and everything is fine except the date-time output of each comment - now it is looking like this: %A %B %e%q, %Y at %I:%M %p . Instead of showing me the date and time of the comment.
I've checked my Date Format and Time Format settings in my admin panel and they seem to be set as needed (Date Format: 2009/11/13 and Time Format: 13:30). Maybe there is any parameter that should be passed to the wp _ list _ comments() function?
Look at the template that is displaying your comments. Going to guess that display of comment_date is not coded correctly.
The Date and Time Format in your control panel does NOT typically control how the theme displays date and time information.
Also see: Formatting Date and Time