Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

danncoba on "wp_insert_term with polylang"

$
0
0

Thanks for the advice but it didn't work...
Here is the code that i'm using
$term = wp_insert_term(
'aaaaas', // the term
'custom_tax', // the taxonomy
array(
'description'=> 'Just to see the language at its best',
'slug' => 'custom-tax',
)
);
global $polylang;
$polylang->model->set_term_language($term->term_id, 'en');

wp_insert_term returns the term_id so acording to you'r advice it should be enought but it isn't


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>