WP中的自定义字段模板-对应的代码段
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了WP中的自定义字段模板-对应的代码段相关的知识,希望对你有一定的参考价值。
// On code side: Category: <?php $group = get_post_meta($post->ID, 'Category'); foreach(($group) as $groups) { echo $groups; } ?> Features: <?php $group = get_post_meta($post->ID, 'Features'); foreach(($group) as $groups) { echo $groups; } ?> <?php $group = get_post_meta($post->ID, 'SiteLink'); foreach(($group) as $groups) { echo $groups; } ?> <?php $group = get_post_meta($post->ID, 'Description'); foreach(($group) as $groups) { echo $groups; } ?> // On wp side: [Category] type = textfield [Features] type = textfield [SiteLink] type = textarea rows = 2 cols = 60 tinyMCE = true [Description] type = textarea rows = 8 cols = 60 tinyMCE = true
以上是关于WP中的自定义字段模板-对应的代码段的主要内容,如果未能解决你的问题,请参考以下文章