Hi,
That’s because you’ve set a dependency for it of slickjs
but there’s no script loaded before that uses that name. Change it to slick_js
and it should turn up 🙂
Hi @blizzrdof77
This is an old topic. I don’t think PHP imports will be implemented as it’s replaced by JSON. Nowadays you can export in JSON and import in JSON.
The PHP export is now more of an “Code generator” when you want to implement the acf fields directly from code.
Hi @room34
Understandably. Yeah that’s what I was referring to. I couldn’t remember which release it was just that it’s been talked about on github a while back.
I’ll post an issue for Elliot to look into.
Just have to ask, are the client using any DB cache solutions like OPcache?
@tabboy
Yeah that’s what I meant by:
However then it will always use the regular upload input type rather than WordPress native.
The gallery field needs WordPress core functionality to work so yeah that’d probably be a different case 🙂
Hi @emrl
But what is it you want the shortcode to generate? ACF field inputs? Or field outputs?
With inputs you have the issue I mentioned above.. I mean, ACF could render the inputs but it’d be very hard to make any sense of them in a theme frontend with <form> elements etc.
And with outputs.. well most of the fields are reduntant because they are just regular tinyMCE input (paragraphs, numbers, dates, links, images etc.). And for the more complex field types like repeater field.. I don’t know how one would assume to display that in the editor in a standardized way. They’re being used in so many different ways it’s impossible.
Sorry for beating down on your idea 🙂 I’ve been using ACF since the early days and I’ve developed quite a few add ons for it so I’m just trying to figure out wether this would be a good idea or not.
Hi @emrl
Not sure if you’ve seen this: https://www.advancedcustomfields.com/resources/shortcode/
Is it anywhere near what you’re looking for or are you talking about actually adding acf input fields into the editor. I don’t see how that would work as they have to be inside a form to even work and you have to add acf_form_head where they’ll be used.
If you just want a way to add acf_form to the editor I’ve written a plugin myself that can do this: https://github.com/jonathan-dejong/acf-form-shortcode
I’m not sure wether it’s an issue with ACF or not.
But looking at your code I see that you’re not using acfs update_field()
function but rather update_post_meta()
.
In order for field meta to appear properly in newly created posts where the meta hasn’t already existed you have to use update_field()
with the field key NOT the field name. Do that and I think you should be fine!
Hi @movingsale
You’re registering scripts and CSS files using wp_footer which should not be done. Then you’re registering some more using the wp_enqueue_scripts
hook which is correct.
You should move all your scripts and css into the second function. Also make sure you put the scripts in the correct order of when they’re required. Look at the dependency parameter of wp_enqueue_script()
https://developer.wordpress.org/reference/functions/wp_enqueue_script/
My best guess is that you have issues with the order of scripts loading and/or some files not loading at all. Also, make sure that if the slick slider tries to use some images and/or fonts for the graphical things like arrows, they need to be added and linked correctly as well.
My tip to you is to have a look at your sites console tab in the inspector (chrome, firefox). I think safari has something like it too but I’ve not used it for developing for quite some time so I don’t know 🙂
Hi @tim92
You should be able to do this with a plugin and ACFs JSON support.
How are you adding the JSON to your plugin?
Hi @ryandorn
You would probably need to modify the query yourself.
Here’s an example that limits the query when visiting the uploader in admin. You need to do something like this but for when it’s triggered on your frontend form.
//Manage Your Media Only
function mymo_parse_query_useronly( $wp_query ) {
if ( strpos( $_SERVER[ 'REQUEST_URI' ], '/wp-admin/upload.php' ) !== false ) {
if ( !current_user_can( 'update_core' ) ) {
global $current_user;
$wp_query->set( 'author', $current_user->id );
}
}
}
add_filter('parse_query', 'mymo_parse_query_useronly' );
Hi @khaled
Sorry I’ve not been working as support during the summer.
Do you still need help with this issue?
Hi,
Oddly I thought the Google map API key would be added as an input in ACFs settings. It still might but in the meantime thank you @rpetersnmt for linking to the filter 🙂
Hi @sangnguyen
I don’t think it will since it’s not really something people request or usually need. But I’m sure that if you really need it you can get a developer to work on it for you fairly simply 🙂
Have a good day
Hi @decay
Thank you for the examples. I want to note that you’re setting a $h3
variable inside the if statement that’s not being used in the example.
So for anyone looking to use this you do not need that. Here’s a cleaned up example:
if( get_sub_field( 'fieldname/fieldkey' ) ){
echo sprintf( '<h3>%s</h3>', $title );
} else {
echo sprintf( '<h2>%s</h2>', $title );
}
And a shorthand version:
echo ( get_sub_field( 'fieldname/fieldkey' ) ? sprintf( '<h3>%s</h3>', $title ) : sprintf( '<h2>%s</h2>', $title ) );
@room34 where you able to determine wether this was due to ACFs caching?
Do you still get this with the latest version? (ACF changed the way caching occurs a little while back).
Hi @websul
Sorry for a long delay in response. Are you using the gallery field perhaps rather than image field? That would lead to $img
being an array of images.
Might be interesting to know that it’s to upload files without permissions if you do it through acf_form() in the front end. However then it will always use the regular upload input type rather than WordPress native.
Just some info for people that might find this topic.
I’ve notified Elliot of this in our bug tracker.
Hopefully he’ll be able to take a look at it soon enough!
I’ll consider this issue as solved now. Seems all questions have been answered?
Hi,
Yes this will be resolved (you’ll be able to provide your own api key) in the next version 5.5 which is in it’s final stage.
I don’t have an exact date when it’ll be released but any day now 🙂
@richtelford
Yeah I suppose you could always hook into the acf/save_post
action and save the meta to the term from there. I have not seen the workaround but I’m guessing it’s something like that.
In any case it should release quite timely with WP 4.6 that introduces the new WP_Term_Query
class 🙂
Hi @khaled
Can you please check the console in Chrome to see if there’s any JS errors that occurs.
Also, please try deactivating all other plugins to rule out compatibility issues.
Hi @klausb
Looking at ACF Pro this is completely different now.
The file no longer exists and everything is generated through internal acf functions.
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.