[Plugin: Polylang] Filter : pll_get_taxonomies
-
So I’ve been ripping my hair out the last couple of days trying to get the pll_get_taxonomies-filter to work. I’m not particularly code-savvy but things tend to work after some trying, but this time I just end up with failure and a heap of errors.
I’ve been reading the documentation, but without any examples to modify I stand pretty clueless.
Anyways, I’m trying to disable the language filtering for a couple of custom taxonomies, and I’m guessing it should be used with add_filter in my functions.php after where I have declared my taxonomies.
To me, the most logical solution (after reading the documentation) would be to write it like this:
add_filter('pll_get_taxonomies', 'my_taxonomies'); function my_taxonomies() { $taxonomies = array( 'taxonomy_A', 'taxonomy_B' ); }
… which gets me this error: Warning: in_array() [function.in-array]: Wrong datatype for second argument in […]/wp-content/plugins/polylang/include/core.php on line 392
Could anyone please, please, please show me an example of the correct method?
Thanks ??
- The topic ‘[Plugin: Polylang] Filter : pll_get_taxonomies’ is closed to new replies.