A section of the PHP code that shows all the classifications wants to change to show specific categories.
Add_filter (' get_terms ', ' get_subcategory_terms ', 10, 3);
function Get_subcategory_terms ($terms, $taxonomies, $args) {
$new _terms = Array ();
if (In_array (' Product_cat ', $taxonomies) &&! is_admin () && is_shop ()) {
foreach ($terms as $key = = $term) {
$new _terms[] = $term;
}
$terms = $new _terms;
}
return $terms;
}
This is the current code. There is a table in my database that has a field that is term_id I have the term_id of the categories that need to be displayed $duqu inside I want to ask how to insert this variable into the above code can only show those selected term_id classification it?
Share to:
------Solution--------------------
while ($DUQUSHUJUKUWP _terms=mysql_fetch_array ($SHAIXUANKUWP _terms)) {$duqu _slug[]= $duqushujukuwp _terms[slug];}
$duqu _slug is an array of rows you don't want to display.