Sedang Disiapkan

Write one very quick PHP "foreach" or "if-then" statement, also consult on a JS solution to slideToggle nested divs.

I am working on a WordPress project using Advanced Custom Fields and cannot for the life of me figure out how to properly construct the loop to only display repeater sub fields IF there is content to populate the wrapping element. Here is a small album of

1. the code block i have so far (not doing exactly what i need, but close),

2. an inspected browser shot showing what is rendering,

3. a screenshot of the ACF field group in question.

[url removed, login to view]

So my "problem" is highlighted by the deep red bar across the content area (i only painted it red for this example) should not make it to the browser because it was never populated with ACF data. This block corresponds to the highlighted code in the inspector window so you can see what is surrounding it. The issue i am struggling with is that particular "box", as well as the ones above and below are empty, in that there is not supposed to be content, and therefore i wish these wrapping <div>s would not render. How do i get these to only make it to the browser IF there is actually content coming from ACF.

Some notes: I needed to set the ACF repeater up with a variable data inside so the user could select whether they are trying to inject a table, a chart, or a header for either one. The layout will be ever changing so in cannot program anything static.

Do i need to use some kind of "foreach" statement? is there a quick edit to what i have that will strip out the extra divs?

Thanks for your interest!

I might be willing to go over the $30 micro project if we come to an agreement, though i have a pretty good idea of how close this project already is to complete sans ~30 mins of work.

Kemahiran: Javascript, PHP, Kejuruteraan Perisian, Wordpress

Lihat lagi: what is the problem statement, what is problem statement, what is a problem statement example, what is a problem statement, what is an example of a problem statement, statement problem example, statement problem, statement of the problem example, statement of a problem, program problem statement, problem statement example, problem statement, make a chart, js to write content in div, it problem statement, i need a quick code for wordpress, how to write problem statement, how to write a problem statement, how to write a code in php, how to make a statement of the problem

Tentang Majikan:
( 1 ulasan ) Trenton, United States

ID Projek: #10098329

Dianugerahkan kepada:


I need to see the function for have_rows() Also, I can give advice on php to get you over the hump free of charge.

$25 USD dalam sehari
(0 Ulasan)