如何让WordPress“添加/编辑帖子”形式更像 Tumblr 吗?

发布于 2024-08-31 19:04:38 字数 349 浏览 6 评论 0原文

WordPress 要求您为每篇博客文章提供至少两个字段:标题和文本正文内容。

我想知道如何修改 WordPress 管理,以便我有时可以输入博客文章的单个字段,特别是 URL,而不需要 WordPress 提供标题(相关但不是此问题的重点:a然后,自定义主题就会知道如何处理仅包含 URL 的帖子,它会将其视为 Tumblr 中的“链接”帖子)。理想情况下,如果可以修改“添加/编辑帖子”表单,以便在需要时仅包含此单个 URL/链接字段,那就太好了。

我猜这可以通过插件实现,但我不确定。我希望一些聪明的 WordPress 开发者能够在这里分享并集思广益如何实现这一点。

预先感谢您的帮助,

艾略特

WordPress requires you give each blog post at least two fields: a title and text body content.

I'm wondering how to modify WordPress admin so I can sometimes enter a single field for a blog post, in particular a URL, without WordPress requiring a title (related but not the point of this question: a custom theme would then know how to handle a post that only contained a URL, it would treat it like a "Link" post in Tumblr). Ideally it'd be good if the "add/edit post" form could be modified so it only contains this single URL/Link field when this is wanted.

I'm guessing this is possible through a plugin but I'm not certain. I'm hoping some smart WordPress devs are here to share and brainstorm ideas for how this could be done.

Thanks in advance for any help,

Eliot

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

听风念你 2024-09-07 19:04:38

您可以使用我其他答案的显示部分,但不要仅循环帖子,还要检查“链接”(内置 WP 功能)。它们易于管理,您可以拥有多组链接,这些链接可以像常规帖子的类别一样使用。

GUI 不能很好地处理帖子,例如在“帖子概述”表中,它确实需要标题。

You could use the display-part of my other answer but, instead of looping only posts, check for 'links' (builtin WP feature) as well. They are easy to manage and you can have many sets of links, which could be used like categories for your regular posts.

The GUI would not handle posts well, for example in the 'post overview' table, which really would need a title.

被你宠の有点坏 2024-09-07 19:04:38

您可以像往常一样使用 Wordpress 并查找“自定义字段”的某个值。每当您的一篇帖子具有特定标签(例如,url,或者如果您希望为其命名空间,则为 sykes-theme-url),您就不会渲染该帖子像平常的帖子一样,但你一起打印出网址/没有描述。

这样你就可以简单地跳过打印帖子的标题(就像 Tumblr 一样),而只需将 URL 发布到其他地方。

请参阅 Smashing 的自定义字段文章杂志

You could use Wordpress as usual and look for a certain value of a "custom field". Whenever one of your posts has a certain tag (url, for example, or sykes-theme-url if you wish to namespace it), you don't render the post as a usual post but you print out the url together/without a description.

This way you could simply skip printing the post's title for example (much like Tumblr), and instead just post the URL to that-other-place.

See Custom Field-article at Smashing Magazine

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文