最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - How to Call on WordPress Custom Fields without a Plugin

programmeradmin1浏览0评论

I have two custom fields created for pages, not posts, in WordPress. How can I display the values of these custom fields in a block editor, such as Elementor, without the use of a plugin like ACF? I've read many articles with directions on placing custom code in either the functions.php, single.php, or page.php. However, there are no directions on how to call upon these custom fields within the content.

Here is what I would like to do:

  • Add a custom field to a page using native WordPress custom fields
  • Display this custom field anywhere I want to on a page using a shortcode
发布评论

评论列表(0)

  1. 暂无评论