ACF Gallery field images donwload

I’m using this same code and I was able to figure out where the error’s happening. The path that gets generated when this line of code is called is wrong: $zip->open( $destination, ZipArchive::CREATE ); It spits out your home directory and then appends the value of $destination to it. In my case (it’s not the … Read more

If statement shortcode

Try this: <?php function howitworks() { $page = get_page_by_title(‘shop’); $html=””; if (have_rows(‘steps’, $page->ID)) : $html .= ‘<div class=”test”>’; while (have_rows(‘steps’, $page->ID)) : the_row(); $image = get_sub_field(‘icon’); $html .= ‘<div class=”col”> <img src=”‘.$image[‘sizes’][‘thumbnail’].'” alt=”‘.$image[‘alt’].'” title=”‘.$image[‘alt’].'” /> <h2>’.get_sub_field(‘step’).'</h2> <p>’.get_sub_field(‘description’).'</p> </div>’; endwhile; $html .= ‘</div>’; endif; return $html; } add_shortcode(‘howitworks’, ‘howitworks’); ?> EDIT: I change up my code … Read more

Possible to edit custom date field and display?

Editing the theme is a good way to get this done, if it’s a theme with updates from someone else I would make a child theme to prevent your changes being overwritten: https://developer.wordpress.org/themes/advanced-topics/child-themes/ Another option is to make a plugin that utilizes a shortcode that allows any WordPress editor to just plug that shortcode into … Read more