我有一个前端的新职位和编辑职位的形式。
我将使用<?php wp_insert_post( $post ); ?>
如果有的话editor 或admin 修改了前端的所有作者帖子:<?php the_modified_author(); ?>
不工作。但修改日期/wp-admin
管理员面板操作它。
我想更新<?php the_modified_author(); ?>
在我的功能上!但是怎么做呢?
我有一个前端的新职位和编辑职位的形式。
我将使用<?php wp_insert_post( $post ); ?>
如果有的话editor 或admin 修改了前端的所有作者帖子:<?php the_modified_author(); ?>
不工作。但修改日期/wp-admin
管理员面板操作它。
我想更新<?php the_modified_author(); ?>
在我的功能上!但是怎么做呢?
the_modified_author()
显示其ID已存储在中的用户的名称_edit_last
post meta字段。
如果您想在其他用户更新帖子后更新ID,可以使用update_post_meta( $post_ID, \'_edit_last\', get_current_user_id() );
. 使用时,将显示新用户名the_modified_author()
.
代替get_current_user_id()
如果更新帖子的不是当前用户,则使用自定义用户ID。
我正在尝试添加一个表单,用户可以从前端提交帖子。我正在学习本教程:http://wpshout。com/wordpress从前端提交帖子/我正在做的是添加this code 到我的一个页面模板。表单显示正常,但当我单击“提交”按钮时,它会显示“Page not found error“”许多评论者说这不起作用。谁能给我指出正确的方向吗?代码是否不完整?有缺陷吗?我做错什么了吗?谢谢Towfiq I。