It is easy to use for a starter.
I think it is possible for this.
Yep, it really helps and important to us to use ACF. Maybe U can include “ACF: Theme Code Pro” in ACF pro in someday. Talk with Aaron Rutley and benpearson. 🙂
I talk about the methods of fields displaying. Such as the flexible field, if I want show it in the page, I need write lots of code to show it in the page. for example, I create a field I need insert below code in the single page. Can U provide various way to show the fields.
// check if the repeater field has rows of data
if( have_rows('app-img') && is_single() ): ?>
<hr class="featurette-divider2" id="showcase_carousel">
<div class="container-img marketing">
<div class="page-header">
<h2 class="slim">截图<br><small>(可以左右滑动查看!)</small></h2>
</div>
<div class="featurette">
<div class="controls marginbottom">
<button class="btn btn-default" id="showcase_prev"><i class="fa fa-angle-left"></i> Prev</button>
<span class="divider"></span>
<button class="btn btn-default" id="showcase_next">Next <i class="fa fa-angle-right"></i></button>
</div>
</div>
</div>
<div class="featurette featurette_full">
<div class="mightyslider_carouselModern_skin clearfix" id="showcase">
<div class="frame" data-mightyslider="width: 1170, height: 550">
<ul class="slide_element">
<?php $rows = get_field('app-img'); ?>
<?php foreach($rows as $row)
{
echo '<li class="slide" data-mightyslider="cover:\'';
echo $row['data-cover'].'\', title: \'';
echo $row['data-title']. '\', desc: \'';
echo $row['data-desc']. '\'"></li>';
} ?>
</ul>
</div>
<div class="details">
<div>
<div id="title"></div>
<div id="desc"></div>
</div>
</div>
</div>
</div>
<?php endif; // if( get_field('to-do_lists') ): ?>
Hello,
As Theme code plugin do, if I build any type of fields, it can create a php code which I can insert to the php file displaying the Custom fields. I think when we create a field, the field had an unique ID, and we can easy to control the field displaying. If it be realized we wouldnt write the_field every time. just use a simple code to show the field.
Thanks!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.