Home › Forums › Add-ons › Repeater Field › Repeater to show certain row › Reply To: Repeater to show certain row
I’m not exactly sure what your seeing or why, but your if statement is likely the cause since it will give unexpected results
if (get_sub_field('brand_name') == the_title()) {
the_title() echos the title of the post so every pass through the loop is echoing the title. I don’t know what results from attempting to compare a value to an echoed value.
try using get_the_title()
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.