Oh jeez! I had been modding the wrong functions.php, since i switched to the default theme. I can confirm the load_value
filter fires and works as expected. Thanks for sticking with me.
Thanks, I read through the docu on that filter.
I also tried using acf/prepare_field
. I’m not sure any of these filters is getting fired, though. I have added error_log( print_r ( $field, true ));
into the filter just to check that variable and nothing is appearing in the debug log.
With the acf/load_value
filter I tried using various priorities, and also eliminated the post_status check ( so any false value would trigger the default ) but still nothing’s doing.
What’s the last parameter on the filter, ‘3’?
Just checked. Yes i do!
Should I not? and if not how will the postbox get the saved terms?
Thanks John. Using ACF 5.5.7.
This is for adding a new post. I’m not too concerned about previously saved posts, just trying to get the default working for new posts.
screen: http://localhost:8888/projectkiteboat/wp-admin/post-new.php
Hi John,
I’ve disabled all other plugins and switched to 2017 theme, but it’s still not working – odd!
Here is a screen grab of the web inspector, just to show that i have the relevant field key and default value.
add_filter('acf/load_field/key=field_58086a9b13be5', 'kiteboat_set_tax_default');
function kiteboat_set_tax_default( $field ) {
$field['default_value'] = 304; // that's "private"
return $field;
}
Is the default value filterable?
I’ve seen this post on filtering default tax field for front end editor, but the filter’s not working for me in the basic back end admin.
Hi Eliot,
Just want to say I appreciate your making this plugin. On the site I’m currently developing the client wants to use tons of HTML within the content editor. With the code modal box (without line breaks, in other words, and within a relatively small window) it was nearly impossible to edit.
Having the WP wysiwyg available is helpful in dealing with it.
I’m using it on ACF 4 btw
The disappearing WYSIWYG problem just recurred for me today with a new install of ACF. I’m sure everybody’s working hard on v5 but this is a pretty serious issue – you can’t have a plugin that creates more fields, taking fields out!
ACF itself is *definitely* the source of the problem – I just removed all plugins and added them back one by one. Even without ACF Repeater and Options, only basic ACF seems to cause #postdivrich to load with display:none; – this seems to originate at the top of post.php itself, but my detective skills are lacking here.
Overriding #postdivrich { display:none; } in the developer console causes the WYSIWYG to reappear.
I just tried a hack, hooking on admin_init, where i force the display: block; style with !important, that works.
function nim_show_editor(){ ?>
<style type="text/css">
#postdivrich {display: block !important;}
</style> <?php
}
add_action('admin_init', 'nim_show_editor');
Hi Elliot,
Same problem here, I believe this should be marked as not resolved, as Matthew reports in his edit above, it’s not solved for him either.
TinyMCE does not load on posts where ACF WYSIWYG field is enabled.
I too initially had a problem because I was trying it with TinyMCE advanced, but I just tried ACF on an installation without that plugin, and the tinyMCE is still disabled
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.