• Gợi ý từ khóa:
  • Tủ hóa chất, Tủ an toàn sinh học, Tủ hút khí độc,...

Tủ hút khí độc

  • grid
  • list
Sắp xếp theo:

Tủ hút khí độc – Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.

The description is not prominent by default; however, some themes may show it.

ACF – Get Custom field value from category

All the template functions (get_field, the_field, etc) can be used to load values from a taxonomy term, however, a second parameter is required to target the term. This is similar to passing through a $post_idparameter to target a specific post object.

The $post_id parameter needed is a string containing the the term’s taxonomy and ID in the following format; “{$term->taxonomy}_{$term->term_id}”

Instead of the above string, a term object can also be passed as the $post_id parameter as of ACF v4.3.3. You can get a term object via many of WP’s functions such as get_term.

<!--?php $product_id = $post->ID;<br ?--> $taxonomy = 'product_cat'; // this is for any other custom taxonomy
$taxonomy = 'category'; // this is for default wordpress taxonomy
$terms = wp_get_post_terms( $product_id, $taxonomy );
?>

All the template functions (get_field, the_field, etc) can be used to load values from a taxonomy term, however, a second parameter is required to target the term. This is similar to passing through a $post_idparameter to target a specific post object.

The $post_id parameter needed is a string containing the the term’s taxonomy and ID in the following format; “{$term->taxonomy}_{$term->term_id}”

Instead of the above string, a term object can also be passed as the $post_id parameter as of ACF v4.3.3. You can get a term object via many of WP’s functions such as get_term.