Update post (published) date when changing category

Is there a way to update a post (published) date when you change the categorytaxonomy to a specific one?Example:- Post

Is there a way to update a post (published) date when you change the category/taxonomy to a specific one?

Example: - Post type "Projects" - 2 categories: Progress/ Done When you change the category for the post "Project One" (from Progress) to Done, the published date has to be the currect date and time, zo it will be the last published post.

Is there a way to update a post (published) date when you change the category/taxonomy to a specific one?

Example: - Post type "Projects" - 2 categories: Progress/ Done When you change the category for the post "Project One" (from Progress) to Done, the published date has to be the currect date and time, zo it will be the last published post.

Share Improve this question asked Aug 11, 2019 at 8:17 DannyDanny 136 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

You can display the date the post was last modified, using the Default date format setting (e.g. F j, Y) from Administration > Settings > General. Here is a code using Default date formate.

<p><?php printf( __( 'Last modified: %s', 'textdomain' ), get_the_modified_date() ); ?></p>

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745252078a4618737.html

相关推荐

  • Update post (published) date when changing category

    Is there a way to update a post (published) date when you change the categorytaxonomy to a specific one?Example:- Post

    2小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信