So I am making a news website about the future, 2112 to be specific (hello, critics). I wanted to display a post's date to be from 2112. But when I try to do this from the admin panel, it 'schedules' the post. I really want to publish the post in this century. Any help, people?
|
|
I had the same issue as you when I was dealing with events and wanted to show future events. Here is what I coded:
Please see here How to set a custom post type to have viewable future posts where I had the same question when dealing with a CPT. |
||||
|
This might work:
The main issue this faces is that there may be a cut off/rollover around 2030~ depending on your system. In those cases, print out the current date, but without the year, then manually print the year afterwards, e.g.:
The issue here being that the 1st january 2013 will become the 1st January 2112 not 2113 |
|||
|
|
|
What about making a taxonomy for 'future year' and then assign it as 2112 in your posts? You could go further and make a secondary date custom value for all your posts and sort by that instead of the real date. (Also? Rush!) |
|||||
|
|
You could use a simple custom field for adding future post dates. If you don't see custom fields in the post/page editor, then click on screen options(top right area of editor screen) and make sure "custom fields" is checked. Now, looking at the custom fields box in the post/page editor, click on "Enter new". For the "Name" text field, enter a descriptive name for your custom field such as "futureDate": in the "Value" text field enter the date you would like to have displayed. Finally, you will need some code in your template file to display what you have stored in the custom field. It could look like this:
Using this method you could also order your posts by this custom field value with a query such as this(not tested):
|
|||
|
|
