Support

Account

Forum Replies Created

  • @jrisum no, we never got anywhere with this. Just the plugin code change I mentioned – and we haven’t upgraded the plugin since the beta version.

  • It seems like not accepting an underscore is a bug. Regular react based blocks have no issue with underscores

  • @johanhermansson the load is working perfectly – I used what you had posted earlier. The save function is where it gets tricky.

    What you just posted is working for me for now, thanks for the quick reply.

  • Has anyone been able to do something similar with the save function?

    I copied @johanhermansson suggestion into the save filter, but am getting this error:
    [18-Mar-2019 22:20:21 UTC] PHP Warning: rtrim() expects parameter 1 to be string, array given in .../wp-includes/formatting.php on line 2660

    add_filter('acf/settings/save_json', 'my_acf_json_save_point');
    function my_acf_json_save_point( $path ) {
    	$paths = array(THEME_DIR.'/config/acf-configs/acf-json');
    
    	if(is_child_theme()) {
    		//If we are in the child theme, check for child theme specific json files
    		$paths[] = CHILD_THEME_DIR.'/config/acf-configs/acf-json';
    	}
    
    	// return
    	return $paths;
    }
  • @alicam unfortunately I’m not able to share the plugin at this time (it’s for my job).

    The plugin, at the moment, is just a native Gutenberg block called “Row”. I created it following this tutorial for making a nested block. It’s essentially just a wrapper div with the <InnerBlock> inside of it. Sorry I can’t be more helpful!

    https://raquelmsmith.com/blog/how-to-create-nested-blocks-for-gutenberg

  • I have made a change to the ACF plugin to accomplish this – perhaps I need to submit as a Git Issue/PR?

    In any case – in blocks.php in ACF, line 88 validate_block_type – I added an additional parameter to $block array and was successfully able to pass it along via the acf_register_block function.
    'parent' => ''

  • @edwardn I figured it out on my end. I had another function that was only enabling certain default blocks. I had it set up as a whitelist instead of a blacklist and so it wasn’t showing my new testimonial test block. Once I disabled my script it appeared in the list!

  • I’m using 5.8.0-beta3 & WP 5.0 and experiencing this same issue.

    I tried the fix suggested by @elliot above, but the plugin file structure seems a bit different and I cannot find that line of code.

    I have copied the example (for testimonials) exactly. I am able to select the location of “Testimonial” when I add the field group, but “Testimonial” does not appear in the editor.

    I’m happy to roll back to an earlier beta, but wanted to see if anyone else was having this issue with beta 3 & WP 5.0.

  • I have this same issue, it’s the weirdest thing. I am running latest ACF and WPML as of Oct 2018. Was there any resolution besides telling it to reverse the order?

    Additionally, in the DB, it’s correct for all of the translations and matches the default language.

  • @jsites did you ever find a resolution to this? i have a similar situation and i’ve tried all of the suggestions i can find to make the admin faster. i’ve disabled EVERY plugin, custom function, enabled json-sync and even tried switching to the default theme. strangely, the admin page loads in about 15 seconds in Firefox, Chrome is about 2-3 MINUTES…

  • thanks for the super quick fix @elliot that solved my issue!

  • My issue only occurs on new pages. I didn’t notice the issue right away because I was just reviewing existing content to make sure that looked ok.

  • +1 !!! Especially for Flexible Content

  • @MonikaTS change all instances of “Template Name Posts” to “Single Post Template”

    Looks like the single post template plugin was updated!

    A year late, but I just figured this out!

  • if you do:
    echo $address[0] — you would get the name of the place
    echo $address[4] — should be the zip code

    you can just put in different values to see what each one is, or you can do print_r($address); which will give you the array with all of the values.

  • hey raeanne,

    sure – here you go. i am using the ACF repeater and the HTML address tag (i’m making a page with multiple contacts listed)

    <?php if( have_rows(‘contacts’) ): ?>
    <section class=”contact_list”>
    <?php while( have_rows(‘contacts’) ): the_row();

    // vars
    $contact_address = get_sub_field(‘contact_address’);

    ?>
    <address>
    <?php $address = explode( “,” , $contact_address[‘address’]);
    echo $address[1].'<br/>’; //street number and line break
    echo $address[2].’,’.$address[3]; //city, state
    ?>
    </address>
    <?php endwhile; ?>
    </section>
    <?php endif; ?>

  • The above was close… I’m crap with terminology so bear with me. The above doesn’t work because it won’t return the right stuff (see, crap with terminology 😉 )

    You have to create a variable for the location field so you can access the address array.

    $location = get_field(‘location’)
    $address = explode( “,” , $location[‘address’]);
    echo $address[0].'<br/>’; //place name
    echo $address[1].'<br/>’; // street address
    echo $address[2].’,’.$address[3]; // city, state zip

    This would display as (using your address example):
    Digiplex- Poway
    Poway Road
    Poway, CA

    I would just hard code the word “Location:” above this if you need it at all.

    If you do: print_r(explode( “,” , $location[‘address’]));

    You will get the array of information that is available from the address object, in case you want country or don’t want street address, etc. Obviously you can tweak the html to your needs when you echo out each thing.

    Hope this was helpful!


    @kingafrojoe
    definitely got me on the right path, so thanks dude!

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