-
Hello,
I’m looking for a way to add field on UserPro Frontend Publisher with the Bunyad Featured Video Code, which could be added from the backend publishing. This is all I found in the template docs:
——————————————-
options.php
——————————————-PHP12345678910111213141516171819202122232425$options = array(...array('label' => __('Featured Video Code', 'bunyad'),'name' => 'featured_video', // will be _bunyad_layout_style'type' => 'textarea','options' => array('rows' => 7, 'cols' => 90),'value' => '',),);...<div class="bunyad-meta cf"><?php foreach ($options as $element): ?><div class="option"><span class="label"><?php echo esc_html(isset($element['label_left']) ? $element['label_left'] : $element['label']); ?></span><span class="field"><?php echo $this->render($element); ?></span></div><?php endforeach; ?></div><?php wp_enqueue_script('theme-options', get_template_directory_uri() . '/admin/js/options.js', array('jquery')); ?>...——————————————-
content.php
——————————————-PHP12345<?php elseif (Bunyad::posts()->meta('featured_video')): // featured video available? ?><div class="featured-vid"><?php echo apply_filters('bunyad_featured_video', Bunyad::posts()->meta('featured_video')); ?></div>——————————————-
functions.php
——————————————-PHP12345...// video format auto-embedadd_filter('bunyad_featured_video', array($this, 'video_auto_embed'));——————————————-
wpml-config.xml
——————————————-PHP123<custom-field action="copy">_bunyad_featured_video</custom-field>Could you please give me some advise how can I do this… I’m just a begginer with wordpress so everything is still kinda messy for me…
Thank you very much in advance!
Best regards,
Ivan
Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.