tao-software / tao-schedule-update

Wordpress Plugin to Schedule Content Updates
https://wordpress.org/plugins/tao-schedule-update/
MIT License
16 stars 14 forks source link

Update changes page's URL, not keeping the original. #19

Closed wgshef closed 6 years ago

wgshef commented 6 years ago

My posts are saved to a url in the format "archive/year/monthnum/posttitle". When using Schedule Update, if it is a new month, then the monthnum on the page changes. For example, an existing post at "archive/2018/05/posttitle" is scheduled to update in June. When it updates, the url becomes "archive/2018/06/posttitle".

If I have other posts that are linked to this page, that breaks those links. Is there a way to have the update NOT update the URL?

When I noticed this, I was doing recursive scheduled updates. Not sure if that is a factor or not.

Syberspace commented 6 years ago

You can use the Filter TAO_ScheduleUpdate\publish_post_date to set the date at the time of publishing. See https://github.com/tao-software/tao-schedule-update/blob/9b1909625fe7868a271c5c8160effc0110bf84b7/tao-schedule-update.php#L706-L713 for documentation

wgshef commented 6 years ago

How do I use this? Where is the documentation that describes this?

Syberspace commented 6 years ago

The documentation is right there in the snippet i posted. For further info on how to use that filter feel free to read the full source code.