I need to add these two php functions <?php the_field('city'); ?> and <?php the_field('country'); ?> into the function below in place of the $city and $country variables.
<?php echo do_shortcode('[forecast location="' . $city . ' , ' . $country. '" caption="" numdays="3" iconset="Cartoon" class="css_table_class" cache="true"]'); ?>
Would appreciate any help my PHP isn’t very good at all and I keep getting erros.
Thanks
the_fieldoutputs the field value instead of returning it. You needget_the_field: