futuremedia / acf-tax Goto Github PK
View Code? Open in Web Editor NEWA simple add-on to the ACF Wordpress plugin
A simple add-on to the ACF Wordpress plugin
Warning: in_array() expects parameter 2 to be array, boolean given in /wp-content/plugins/acf-tax/acf-tax.php on line 200
I changed line 200:
if($field['taxonomy'] == $term->taxonomy && in_array($term->term_id,$field['value'])){
to this:
if($field['taxonomy'] == $term->taxonomy && !empty($field['value']) && in_array($term->term_id,$field['value'])){
...and it works now.
I get this message when I save posts using WP 3.5.1
Warning: Invalid argument supplied for foreach() in wp-content/themes/xyz/fields/acf-tax.php on line 288
Warning: Cannot modify header information - headers already sent by (output started at /wp-content/themes/xyz/fields/acf-tax.php:288) in /wp-includes/pluggable.php on line 876
Any idea what it might be caused by?
When using this add-on and submitting a post without selecting any taxonomy items an error is thrown due to trying to carryout a foreach on a non-array. Line 288.
I have a Warning: Division by zero on two locations. Have no idea what it is. When I work locally the plugin doesn't save the checked boxes, and when I tried it now on a remote server I got this message in the admin interface.
Warning: Division by zero in /theme/acf-tax.php on line 162
Warning: Division by zero in /theme/acf-tax.php on line 168
Hello,
I get this error message after I add the field Tax in Advanced Custom Fields plugin.
"Warning: in_array() [function.in-array]: Wrong datatype for second argument in /themes/test-theme/layouts/acf-tax.php on line 197"
I see the categories but with this error above them.
Any fix I can apply?
Thanks,
Bogdan
The thing works with Wordpress, technically, but there's one bug I haven't been able to figure out myself yet in the source. Here's an example:
My checkboxes from taxonomy:
Item 1
Item 2
Item 3
Item 4
Item 5
I'll check the following:
Item 1 *
Item 2
Item 3 *
Item 4
Item 5
Upon reload, none of my chosen selections are kept correctly:
Item 1
Item 2 *
Item 3
Item 4
Item 5 *
Any ideas? Been looking in the code at the update and select functions, but everything seems legit. Something's off, though...or it wouldn't be happening.
I installed the last update of ACF (3.4.3) and get this error :
Warning: Invalid argument supplied for foreach() in themes/talm/acf-tax.php on line 346
Also, the vertical-align: text top; gives results that are not better then vertical-align: top; on checkboxes in the user add/ edit screen. Not sure if top is best, but text top gives results that are not aligned.
(using Mac / Firefox 17 )
Hi,
Great plugin. When you add a taxonmy checkbox to users the spacing is off.
This seems to be the 95% width rule that is set to input fields.
Maybe give them a more fixed width and indent them as they go?
Thanks!
I've updated the following code to make it work:
replace:
if (has_term($term->slug, $term->taxonomy, $post->ID)) {
$selected = 'checked="checked"';
}
With:
if($field['taxonomy'] == $term->taxonomy && in_array($term->term_id,$field['value'])){
$selected = 'checked="checked"';
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.