php 向Beaver Themer添加其他自定义字段

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 向Beaver Themer添加其他自定义字段相关的知识,希望对你有一定的参考价值。

<?php
/**
 *  Add Zip and city to Themer
 */
 
add_action( 'fl_page_data_add_properties', 'demo_add_properties' );

function demo_add_properties(){
	FLPageData::add_post_property( 'the_events_calendar_city', array(
	'label'   => __( 'Event Venue City', 'fl-theme-builder' ),
	'group'   => 'the-events-calendar',
	'type'    => 'string',
	'getter'  => 'tribe_get_city',
) );
	
	
	FLPageData::add_post_property( 'the_events_calendar_zip', array(
	'label'   => __( 'Event Venue Zip', 'fl-theme-builder' ),
	'group'   => 'the-events-calendar',
	'type'    => 'string',
	'getter'  => 'tribe_get_zip',
) );


}



?>

以上是关于php 向Beaver Themer添加其他自定义字段的主要内容,如果未能解决你的问题,请参考以下文章