That seems pretty heavy handed, and also has to be implemented on a field-by-field basis.
I was kind of hoping for something that would turn off that bit of javascript that converts a pasted URL into the embedded video before it ever happens, rather than letting it exist and then re-filtering to remove it on every keystroke or value change.
Was also hoping for a way to target all WYSIWYG Basic fields instead of individual field keys.
But maybe that’s just not possible.
+1 – this would be great to have.
also… don’t run acf_get_local_store( 'groups' )->remove( $key )
directly like some other post here suggests. This is literally exactly what acf_remove_local_field_group
does at the moment if you look in the code.
acf_get_local_store
is not meant to be run directly, I don’t think.
Just wanted to pop in here to say that acf_remove_local_field_group
is working great for me in a child theme where the parent theme defines the group in PHP.
You just have to put in a hook function that fires after acf loads like this:
function myslug_remove_my_field_group() {
acf_remove_local_field_group( 'group_example_7384' );
}
add_action( 'acf/init', 'myslug_remove_my_field_group' );
@iainpoulson Amazing – thanks for putting this feature into ACF Pro. The people have been asking for it in this thread for 7 years and now it’s finally here!
An extra special thank you for keeping the same constant name. We were using our little drop in plugin on dozens of client sites and now we can just delete the mu-plugin and move on instead of having to edit wp-config on every site.
@madebytincans – “or any other file that WordPress runs before it loads the ACF PRO plugin” – I guess they are saying you could technically put the constant in other files that load earlier – but I think most of those files would be something you would want to keep under version control, which would not be a good place to keep your license key. I think the danger of that happening is probably the reason Elliot never implemented this for so many years. Probably best to use wp-config.php unless you have a really special use-case or setup.
Throw this in your MU plugins https://gist.github.com/petertwise/eeb7dea2531ad204a346e42faba0179a#file-acf_pro_license_constant-php
and then add put this in your wp-config file:
define('ACF_PRO_LICENSE', 'yourkeyhere' );
That can be used manually, but I also use this bash script to make it easier to install. Note that the license key is not stored in the script:
https://gist.github.com/petertwise/eeb7dea2531ad204a346e42faba0179a#file-acf-install-license
Please use responsibly. Never ever allow your key to become public. Never include wp-config or any files including licenses and other secrets in any version control system.
It’s also important to double check that you are following [WP best practices and setting wp-config.php permissions](https://wordpress.org/support/article/changing-file-permissions/#shared-hosting-with-suexec) to 440
or 400
when you’re not editing the file.
Sure it would be cool to see this in the ACF core – but it’s also nice to keep the core plugin from getting too bloated – plus it would have to be implemented in an optional/backwards compatible way – I would not want clients who have access to HEX color pickers to suddenly be able to add transparency on the next update.
Have you tried https://wordpress.org/plugins/acf-rgba-color-picker/ to fill this need?
Hey – what’s up 2014 feature request? 😎
+1 from me
still seems like this would be super helpful to a lot of people.
Hi Adam @arkid77 and all – just echoing that I would also love to see this as a plugin/extension and am also happy to help with development.
Hi folks – I know it’s 7 years after this thread started, but I made a solution that does not depend on knowing what the first field is in the after_title field group.
https://gist.github.com/petertwise/8ebb6a76f018494fcc62171d622cc85f
// Admin Functions
( function( $ ) {
// better accessiblity and data entry for ACF
$(document).ready( function() {
// if there is a an "after_title" field group
if ( $( '#acf_after_title-sortables' ).length ) {
// listen for keydown inside the main title field for any add/edit screen
$('body.post-new-php, body.post-php').on( 'keydown', '#title', function( e ) {
var keyCode = event.keyCode || event.which;
// if the key is tab
if ( 9 == keyCode ) {
// don't do the normal core WP behavior
e.preventDefault();
// find the first field in the after_title area
$( '#acf_after_title-sortables .inside > div:first-child' )
.find( ':input:not([type=hidden])' )
.focus();
}
} );
}
} );
} )( jQuery );
/*
Thanks to these Stack Overflow answers for inspiration:
@neiker - https://stackoverflow.com/a/17150138/947370
@gdoron-is-supporting-monica https://stackoverflow.com/a/11278006/947370
@birgire https://wordpress.stackexchange.com/a/127042/41488
*/
Just want to reiterate a simple solution that got buried a bit earlier in the thread, which is to export your field group to PHP and incorporate that into your theme or plugin instead of using the GUI.
Then you can just add disabled => 1
to any field array that supports it.
Not sure how I got on this old thread, but it seems like the basic followup question was not ever explicitly answered here:
As Elliot points out “ACF saves it’s values in the native wp_postmeta table” for fields that are attached to a post.
Likewise, ACF leverages the core wordpress functions and tables for storing options – so they are found in the wp_options
table. Any migration tool that migrates your entire install should move these options just fine.
If you want to migrate a few options values, you might want to checkout the WP CLI option command.
Here’s a quick one to get the current screen slug…
function currentscreen_test(){
$screen = get_current_screen();
echo '<br><h1>       ' . $screen->id . '</h1>';
}
add_action('current_screen','currentscreen_test');
@jonyhayama I have started fixing some bugs and making some new features here:
https://github.com/squarecandy/acf-intl-tel-input
Let me know if you want to join forces!
I think this is a super old thread, but I think it’s still relevant.
Here’s how to do it with a filter:
https://kellenmace.com/advanced-custom-fields-metabox-priority-for-top-above-publish/
It would be cool if “side-high” was a selectable option in addition to “side” but I’m guessing everything is focused on Gutenberg-land now and I’m not sure how this applies there.
Yes – acf-quick-edit-fields is awesome and works great.
You do need to read the setup instructions
1) You must download from the releases page unless you want to build it yourself using npm and gulp. Don’t just try to use the default github zip.
2) You must go into your ACF field settings and check the boxes for each field you want to be editable by quickedit or bulk edit. (or add new settings 'allow_quickedit' => 1, 'allow_bulkedit' => 1,
in the PHP if you manage your fields settings in PHP)
I’ve also used Admin Columns Pro and that’s pretty great too…
For anyone too lazy to go look at the Codex, here it what I used:
// example custom post type is "event"
// example custom taxonomy is "events-category"
function remove_default_event_category_metabox() {
remove_meta_box( 'tagsdiv-events-category', 'event', 'side' );
}
add_action( 'admin_menu' , 'remove_default_event_category_metabox' );
nice, thanks @hayatbiralem
Hmm, yeah. Much harder if you already have a field name with data that you need to preserve. See this thread: https://support.advancedcustomfields.com/forums/topic/changing-field-name-question/
This makes it real easy & nice to use 'hide_on_screen' => 'featured_image'
to hide the default entry meta box and then place the _thumbnail_id
field wherever it makes sense within the ACF form workflow.
OMG @hube2 – brilliant.
Just using _thumbnail_id
for the field name is so easy and makes everything work perfectly. You should pin this at the top of the thread.
Using the filter method and a custom field name:
Just using _thumbnail_id
for the field name makes all of the above scenarios work perfectly.
Thanks for linking to that solution @chris98. But it requires that you write a script that explicitly calls out every existing field, which is tricky if you need add a ton of fields, or are not sure if fields will be added in the future.
Has anyone figured out a way to just disable whatever jquery shenanigans are going on and just have the browser follow the natural tab order of the elements as the appear in the HTML?
Thank you so much @kokers!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.