php - 如何在赫斯提亚主题中显示自定义字段
问题描述
我想在帖子页面上显示我的自定义字段,就在列出的帖子中作者的详细信息、日期和帖子的任何其他元数据旁边。
我已经在 Magazinenp 主题 (ID:, Pages:, Format:) 中完成了此操作,这三个都是自定义字段并成功显示在帖子页面上。基本上在 Magazinenp 主题中,我在 templates-parts .parts .entry-meta.php 中添加代码评论 div
<?php echo get_post_meta($post->ID, ‘ID:’, true); ?>
<?php echo get_post_meta($post->ID, ‘Format:’, true); ?>
<?php echo get_post_meta($post->ID, ‘Pages:’, true); ?>
它工作正常。
但在 Hestia 主题上,不知道将这段代码放在哪里。
请向我建议任何其他代码或任何相关内容。
解决方案
推荐阅读
- php - php 容器的 podman dns 名称
- reactjs - Auth0 React 快速入门登录不起作用,401 未经授权
- ios - 使用 uicollection 视图 Swift 更新单个视图
- node.js - 从 EventEmitter 附加事件函数数组中删除断开连接时的 Socket.IO 发射器
- swift - SwiftUI ObservedObject 使视图在更新时弹出
- html - Vue模板中第一行三个div,第二行四个div
- sass - SASS 结合了来自 vuetify 的 flex 实用程序的多个类
- javascript - 有没有更好的方法来解决 JavaScript 中的递归斐波那契
- android - 在android studio中将字节顺序转换为nativeOrder()时得到“FirebaseMLException:输入ByteBuffer应该是直接ByteBuffer”
- javascript - 当用户单击更新按钮时,如何在 TODO 应用程序的输入字段中设置 li 值(li 内的文本)?