Skip to content
Advertisement

Tag: advanced-custom-fields

Subscript in PHP and Loops

I am using ACF and PHP to create a WordPress website currently working through basically a loop and looking to connect a subscript and a tag by an ID that needs to have a counter increment on it so that the ID can change from #footnote-top-1 to #footnote-top-2, #footnote-top-3, etc and have the link also change. , . If so

advanced custom fields can’t do nested loops repeater inside repeater have_rows() not doing anything

I have a repeater inside a repeater and I need to loop what is in it. I’m following this: https://www.advancedcustomfields.com/resources/have_rows/ This is my field structure: So with that in mind, as I understand it, I need to loop over agenda_section_events and inside that I need to get rows https://www.advancedcustomfields.com/resources/have_rows/ So that code looks like this: I’m really confused because all

PHP if statement: Zero vs ’empty’

I’m creating a WordPress website using the Advanced Custom Fields plugin. I have a set of fields for tennis score results. In the template, I’m showing these fields like this: The problem is that some scores are zero, so they’re not showing up. I understand that this is because 0 basically equals null, so the statement is false. One solution

Advertisement