Home › Forums › Front-end Issues › Front end not showing
Hi,
Maybe i a’m asking a stupid question but i have been searching for a solution for 3 hours now.
I have made a radio group with a select field.
The documentation talks about an API returning the PHP code that i have to implement to the template. Where can i find that code because when i look at the export tot php result it is not showing the get field.
The API doesn’t return any PHP code. Using php you can fetch the return values of a sub field that you can then use in your code…
If i go to the extra fields en press export and select the groep i get the option export to php. I get this result.
if(function_exists(“register_field_group”))
{
register_field_group(array (
‘id’ => ‘acf_binnen’,
‘title’ => ‘Binnen’,
‘fields’ => array (
array (
‘key’ => ‘field_5329ae4ce9630’,
‘label’ => ‘Staat onderhoud’,
‘name’ => ‘staat_onderhoud’,
‘type’ => ‘select’,
‘choices’ => array (
‘Maak een keuze’ => ‘Maak een keuze’,
‘Slecht’ => ‘Slecht’,
‘Matig’ => ‘Matig’,
‘Goed’ => ‘Goed’,
‘Uitstekend’ => ‘Uitstekend’,
),
‘default_value’ => ”,
‘allow_null’ => 0,
‘multiple’ => 0,
),
array (
‘key’ => ‘field_5329e46f1e3ae’,
‘label’ => ‘Test’,
‘name’ => ‘test’,
‘type’ => ‘text’,
‘default_value’ => ”,
‘placeholder’ => ”,
‘prepend’ => ”,
‘append’ => ”,
‘formatting’ => ‘html’,
‘maxlength’ => ”,
),
),
‘location’ => array (
array (
array (
‘param’ => ‘post_type’,
‘operator’ => ‘==’,
‘value’ => ‘listings’,
‘order_no’ => 0,
‘group_no’ => 0,
),
),
array (
array (
‘param’ => ‘post_type’,
‘operator’ => ‘==’,
‘value’ => ‘post’,
‘order_no’ => 0,
‘group_no’ => 1,
),
),
array (
array (
‘param’ => ‘post_type’,
‘operator’ => ‘==’,
‘value’ => ‘page’,
‘order_no’ => 0,
‘group_no’ => 2,
),
),
),
‘options’ => array (
‘position’ => ‘side’,
‘layout’ => ‘no_box’,
‘hide_on_screen’ => array (
),
),
‘menu_order’ => 0,
));
}
What should i do with this then?
Have you read through this carefully?
http://www.advancedcustomfields.com/resources/field-types/select/
I have copied the php code from the url you said into the single list view php and it’s showing on the front page now.
The topic ‘Front end not showing’ is closed to new replies.
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.