Home › Forums › General Issues › How to show older field from same category › Reply To: How to show older field from same category
I’m not completely sure what you’re trying to do, so I’m assuming some things.
<?php
$count = 0; // keep track of how many posts were shown
// the standard WP loop
if (have_posts()) {
while(have_psits()) {
the_post();
$count++; increment count
if ($count == 1) {
// showing first post
// code here to show fields A & B
} else {
// showing older posts
// code here to show fields x & y
}
}
}
?>
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.