跳到内容

Zen Custom Fields

v1.16

Grzegorz Sarzy?ski · 2015年10月21日 上架

Easy to implement and use custom fields for WordPress templates.

正在使用
10+
评分
暂无
累计下载
2,380
最近更新
2019年5月9日
需要 WordPress 3.1+已测试到 5.2.31

截图

Basic usage - simple table with values only.
Basic usage - simple table with values only.
A better approach is to use key/value pairs. In this case you should use table header tags for field names.
A better approach is to use key/value pairs. In this case you should use table header tags for field names.
Using 2 dimensional tables
Using 2 dimensional tables

The plugin converts regular HTML tables, embedded in your page, into arrays of values that you can use in your templates to output the data.
Custom fields can hold text and any HTML code (except for tables). Array of values can be simple index based or more complex key value pairs.
You can embed many tables with values on your page with various data.

Usage

  1. Place the table with values you want to use on your page between ‘[zen-fields] … [/zen-fields]’ short-tags
  2. In your template use ‘zen_field()’ function to output values from above table

If your would like to use multiple tables with values you should name ech table and use table name as the last parameter of zen_field() function

…

Iteration over values in tables

It is possible to iterate over values from your tables. The variable ‘$zen_fields->tables’ holds the array with values from all the tables on the page.

Escaping output

By default output is not escaped which allows you to use links, images and another HTML content in your custom fields. If you would like to escape the output use ‘zen_field_esc()’ function instead of ‘zen_field()’.

For more details check ‘Screenshots’ section

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums