Forum Replies Created

  • Me too. Though in my case, i have setup a tab with 2 image upload fields – the second one works, the first one doesn’t. The WP image manager dialog appears fine, but choosing an image and pressing Select, it goes back to the edit screen with no image selected.

  • Thanks Elliot.

    I should say though, in case there was any confusion, the ACF Location field add-on wasn’t 3rd party (that i’m aware), it’s the one linked from your Add-On’s page: People might get confused since the URL references Google Maps when it’s actually the Location Field Add-On.

    Now that you’ve got the Google Maps field type built in to ACF, you should probably remove the Location Field Add-On from lest someone else hit conflicts as well!

  • Indeed, it appears the ACF Location Field add-on has a conflict…
    Deactivated everything but when i activate ACF Location Field, the WYSIWYG appears with no toolbar and the following text which i didn’t ever type:

    <p><br data-mce-bogus=”1″></p>

    Google Map Field (which i only recently realised was added) seems to be a replacement for the older ACF Location Field anyway, so maybe this isn’t a big issue.

  • This is what Firefox reports:

    Error: TypeError: google.maps.places is undefined
    Source File: /wp-content/plugins/advanced-custom-fields/js/input.min.js
    Line: 13

  • It’s an almost clean install of WP3.81 and 4.34 of ACF.
    I have Gravity forms along with ACF Flexible, Gallery, Options, Repeater and Location (all updated to latest).

    Setting up the options was the first thing i started on this site other than some content population so there’s not much else going on to affect it.

  • Will that add-on be updated for V4 sometime Elliot?

    For Ninja Forms (or Gravity in V4), another way to do this is to just provide an ACF text field for someone to enter a form ID and then output it into a shortcode in your templates. If the shortcode has parameters (like display title yes/no) you can also set up those values as ACF fields as well.

    I guess you could also use an ACF “Select” Field Type as well, but you’d have to manually add options to represent each new form, so it wouldn’t be future proof if the client can create new forms.

  • Thanks Elliot, your code gave me a good head start, my end code is a bit different but does what i want!

    In the end i changed Years to a Country taxonomy. Basic setup was as follows:
    Custom Post Type: Speakers
    Taxonomy: Country (attached to Speakers)
    ACF Speakers Field Group with 2 fields:
    – speaker_title
    – speaker_photo
    ACF Page Field Group with 1 Flexible Content field with 2 layouts:
    – basic_wysiwyg (1 wysiwyg field)
    – speakers_country_list (1 taxonomy field to choose multiple countries, set to return as Term Object)

    The following code outputs it all with Countries as headings before each list of Speakers within that country:

    *  Loop through a Flexible Content field and display it's content with different views for different layouts
    while(has_sub_field("flexible_content")): ?>
    	<?php if(get_row_layout() == "basic_wysiwyg"): // layout: Basic Wysiwyg ?>
    		<div style="border: 1px solid red; margin: 20px; padding: 20px;">
    			<?php the_sub_field("wysiywg"); ?>
    	<?php elseif(get_row_layout() == "speakers_country_list"): // layout: Speaker Country List ?> 
    		<div style="border: 1px solid green; margin: 20px; padding: 20px;">
    				$taxterms = get_sub_field("country"); ?>				
    				<?php foreach ($taxterms as $taxterm) : ?>					
    					$args = array(
    						'post_type' => 'speakers',
    						'tax_query' => array(
    								'taxonomy' => 'speakers_country',
    								'field' => 'id',
    								'terms' => $taxterm->term_id
    					$myquery = new WP_Query( $args );
    					if($myquery->have_posts()) : ?>
    						<h2>People in <?php echo $taxterm->name; ?></h2>
    							<?php while ( $myquery->have_posts() ) : $myquery->the_post(); ?>
    								<li style="margin-bottom: 15px;">
    								if (get_field('speaker_photo')) {
    									$attachment_id = get_field('speaker_photo');
    									$size = "thumbnail";
    									echo wp_get_attachment_image( $attachment_id, $size );
    									echo "<br />";
    								<strong><?php the_title(); ?></strong><br />
    								<?php the_field("speaker_title"); ?></li>
    							<?php endwhile; ?>
    					<?php endif; ?>
    					<?php wp_reset_query(); ?>
    				<?php endforeach; ?>
    	<?php endif; ?> 
    <?php endwhile; ?>
  • Thanks Elliot but i still think my query is related to ACF.
    Your documentation doesn’t list the “Taxonomy” field type that one can select when creating field groups in ACF (under the “Relational” heading in the select box).

    I was just looking for a starter tuturial (like your others) on how to output that field’s data, since the possibility exists for a user to choose single or multiple taxonomies when presented with this field on an edit screen.

    And also, once i’ve got the taxonomies and listed their posts, whether or not i’d be able to access all custom fields of those posts (like you can do with a Relationship field type).

  • Thank you very much Elliot, worked perfectly 🙂

  • You can just get any map embed code from Google, then find where the coordinates are in that code, and replace them with the coordinates from your location field.

Viewing 10 posts - 1 through 10 (of 10 total)