inspirationdate
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Custom Fields (ACF?)] "acf-hidden" class not removed error…Taxonomy fields are set up to refresh the form when they’re changed. This is a custom location rules thing. Normally this isn’t an issue, but in this case ACF can’t update the form because no location rules are matching. Because ACF is returning nothing to replace the form with, it displays nothing.
Your two options are to create matching location rules or stop the form from updating. Unfortunately, if you create a rule so the form is allowed to show up on this page on the frontend, it will also show up on the admin side.
My favourite way to stop the form from updating is to add
data-save=0
to the taxonomy fields. I don’t know why that condition exists, I don’t see it used elsewhere in the code, but it works. Adding the attr with PHP would probably be best, but I haven’t figured out a way to do that yet. I’ve been putting this javascript on the pages I want to suppress updating instead:<script type="text/javascript"> (function($) { $(document).ready(function(){ $('.acf-taxonomy-field').attr('data-save', '0'); }); })(jQuery); </script>
Hopefully in the future we’ll be able to add rules like:
If Page is equal to Register
And Frontend is equal to trueHope this helps.
Multisite activation doesn’t work if it isn’t done network wide.
This:
function customtaxorder_activate($networkwide) { global $wpdb; if (function_exists('is_multisite') && is_multisite()) { if ($networkwide) { $curr_blog = $wpdb->blogid; $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs"); foreach ($blogids as $blog_id) { switch_to_blog($blog_id); _customtaxorder_activate(); } switch_to_blog($curr_blog); } } else { _customtaxorder_activate(); } }
Should be:
function customtaxorder_activate($networkwide) { global $wpdb; if (function_exists('is_multisite') && is_multisite() && $networkwide) { $curr_blog = $wpdb->blogid; $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs"); foreach ($blogids as $blog_id) { switch_to_blog($blog_id); _customtaxorder_activate(); } switch_to_blog($curr_blog); } else { _customtaxorder_activate(); } }