Problems displaying ACF
-
I’m just stupid or but I can’t display ACF
in my content-single.php (yes it is the right file I’ve already altered it a few times…) I entered this code:
<?php
if(is_category('bokrecensioner'))
{
echo '<div style="padding: 15px; border: #000 dotted;">' . '<h4 style="text-align: center;">' . 'Bokfakta' . '</h4>' . '<br>' . '<p>' . acf_get_fields('group_69c7ce7cf28f7') . '</p>' . '</div>';
}
elseif(is_category('biorecensioner'))
{
echo '<div style="padding: 15px; border: #000 dotted;">' . '<h4 style="text-align: center;">' . 'Filmfakta' . '</h4>' . '<br>' . '<p>' . acf_get_fields('group_690cc62871539') . '</p>' . '</div>';
}
elseif(is_category('teater-och-showrecensioner'))
{
echo '<div style="padding: 15px; border: #000 dotted;">' . '<h4 style="text-align: center;">' . 'Showfakta' . '</h4>' . '<br>' . '<p>' . acf_get_fields('group_6a185df8e8409') . '</p>' . '</div>';
}
elseif(is_category('streamingrecensioner'))
{
echo '<div style="padding: 15px; border: #000 dotted;">' . '<h4 style="text-align: center;">' . 'Streamingfakta' . '</h4>' . '<br>' . '<p>' . acf_get_fields('group_69d41ebee596d') . '</p>' . '</div>';
}
elseif(is_category('dvdbd-recensioner'))
{
echo '<div style="padding: 15px; border: #000 dotted;">' . '<h4 style="text-align: center;">' . 'Videofakta' . '</h4>' . '<br>' . '<p>' . acf_get_fields('group_69c7dc06b14a7') . '</p>' . '</div>';
}
?>but it doesn’t work
I know I did something wrong but can’t figure it out…
What I would like is to display different field group depending on which category the specific post belongs toThe page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.