You could use post object instead https://www.advancedcustomfields.com/resources/post-object/
@steveguk yep, they reassured me that ACF would add Gutenberg compatibility – hopefully in time for the release. I’m not really worried about it anymore, I’ll definitely disable Gutenberg on everything for the foreseeable future.
Ha! Yes, it simply isn’t good enough for handing professional sites over to clients. I’ll mark this as solved for now, though I think it’s going to be an ongoing issue…
Cheers for your input.
Thanks John, I’ve submitted a support ticket.
Good point on the idea of a plugin to remove it. Gutenberg doesn’t seem at all ready/appropriate for WordPress core at this stage. Maybe it would be better placed in JetPack for people setting up simple blogs.
well, for my purposes this worked to access appended fields…
$(document).on('focus', 'input', function () {
alert('field is selected');
});
So, both problems fixed!
Okay, I’ve solved the map issue by removing my enqueued script and loading the api with ajax for my map.
if( typeof google === 'undefined' )
{
jQuery.getScript('https://www.google.com/jsapi', function(){
google.load('maps', '3', { other_params: 'sensor=false& libraries=places', callback: function(){
//map code goes here
}});
});
}
Would be great to have acf.add_action('ready append', function( ){
working though
Found a workaround using jquery, it works with an ACF taxonomy single select drop down. It moves the add term form to just under the drop down and when a term is clicked from the drop down it populates the add term field and simulates a click on the add button.
The acf select needs to be set to not update terms.
var $j = jQuery.noConflict();
$j(document).ready(function() {
$j("#my_taxonomy").insertAfter("#acf-my_taxonomy_field");
$j("#tagsdiv-my_taxonomy").hide();
$j("#acf-my_taxonomy_field select").change(function(){
var term = $j('#acf-my_taxonomy_field select').find(":selected").text();
//alert(term);
$j('#new-tag-my_taxonomy').val(term);
$j('#my_taxonomy .tagadd').trigger('click');
});
});
sorry for the bother Elliot, it seemed like buggy behaviour but I can see why it’s set up like that now. I was trying to use this method as a workaround for the lack of a way to add a term, previous issue here adding a term with ACF I got this working with javascript, code on the linked issue.
cheers,
Tom
Thanks Elliot,
I’ll see if I can put together a new field type, looks like it shouldn’t be too difficult to add a simplified version of wp’s term adding form to the taxonomy picker.
Thanks for all your work on ACF, it’s an incredibly useful plugin!
Tom
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.