如何将我的ACF字段添加到另一个插件的形式?如何将我的ACF字段添加到另一个插件的形式
我试过,但这个不起作用
<div class="input-group">
<label for="deal_title"><?php _e('Deal title', 'wcd'); ?> <span class="required">*</span></label>
<input type="text" name="deal_title" id="deal_title" value="<?php echo esc_attr($deal_title) ?>" class="form-control" data-validation="required" data-error="<?php esc_attr_e('Please input deal description', 'wcd'); ?>">
<p class="description"><?php _e('Input title for the deal.', 'wcd'); ?></p>
</div>
//This is the part I want my ACF field
<?php echo the_field('business_name'); ?>
<div class="input-group">
<label for="deal_description" data-error="<?php esc_attr_e('Please type description of the deal', 'wcd'); ?>"><?php _e('Deal Description', 'wcd'); ?> <span class="required">*</span></label>
<?php wp_editor($deal_description, 'deal_description'); ?>
<p class="description"><?php _e('Input description of the deal.', 'wcd'); ?></p>
</div>
将如何实现这一目标?
这不是正确的解决方案,它会为你提供BUSINESS_NAME的价值...请访问此链接进行了详细的解决方案:http://www.advancedcustomfields.com/resources/create-a-前端形式/ –
好吧,让我看看它。 –
我必须添加的字段应该与产品相关联。在后台我有表单。当我从前端添加一个产品时,它的值也应该在后端可见,坚果我无法做到。 –