我想创建一个系统,用户可以提交帖子。 为此,我将用户角色更改为贡献者。 它很完美,用户可以提交帖子。 但我不喜欢用户可以访问wordpress面板。 我想让用户从主题中的自定义用户配置文件中提交他们的帖子。 我有这个功能吗?从没有wordpress面板的用户提交帖子
1
A
回答
0
有2种方法可以做到这一点: 方法1:
There are certain plugins that you can use to accomplish the task.
The below is an example:
https://wordpress.org/plugins/user-submitted-posts/screenshots/
方法2:
You too can achieve this functionality by writing a piece of code that will insert the data in the posts table. for that you have to create a page template and create a form for that template and write code that will work on submit of the form.
Make sure the form data gets inserted into the posts table.
+0
好吧,所以这里是步骤: 1:创建一个表单页面模板,并带有所需的字段。 2:点击提交按钮尝试在function.php中调用wp_insert_post。以下链接最好地描述了如何使用wp_insert_post插入帖子: https://developer.wordpress.org/reference/functions/wp_insert_post/。 –
相关问题
- 1. 提交WordPress的未注册用户的帖子
- 2. 用户提交帖子的Wordpress表单构建器
- 3. 用户在wordpress 3.0中提交的帖子
- 4. WordPress的 - 允许匿名用户提交帖子?
- 5. 提交表单以显示页面中的特定WordPress帖子
- 6. 用户没有帖子
- 7. 交替的WordPress的帖子
- 8. 从帖子到帖子在Wordpress循环页面显示所有帖子显示
- 9. WordPress的 - 单帖子模板 - 显示所有帖子
- 10. 的WordPress:无法从帖子页面
- 11. WordPress的 - 在管理员隐藏的帖子从没有写他们的用户
- 12. WordPress的多个帖子从帖子ID
- 13. WordPress的 - 帖子和页面
- 14. WordPress的帖子页面
- 15. WordPress的帖子内容没有显示
- 16. WordPress的帖子没有显示出来
- 17. 专栏没有空白的Wordpress帖子
- 18. WordPress的没有得到帖子ID
- 19. WordPress的用户提交
- 20. 添加图像附件功能,用户提交的WordPress的帖子
- 21. WordPress的:使用页面模板来获取WP中的帖子
- 22. 显示新的WordPress的帖子没有重新加载页面
- 23. 从非阻止用户提取帖子
- 24. JQuery提取WordPress帖子
- 25. 从posts_where里面获取帖子id wordpress
- 26. WordPress的 - 从现有的照片帖子使画廊帖子
- 27. 加载Wordpress帖子没有get_header()和get_footer()
- 28. WordPress用户链接提交
- 29. 将注册用户帖子提取到wordpress中的另一个页面
- 30. 在提交帖子时,通过XMLRPC API在wordpress中设置帖子标签?
http://wordpress.stackexchange.com/questions/71382/ add-custom-post-type-items-from-front尝试像这样 – vel