如何將我的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-前端形式/ –
好吧,讓我看看它。 –
我必須添加的字段應該與產品相關聯。在後臺我有表單。當我從前端添加一個產品時,它的值也應該在後端可見,堅果我無法做到。 –