Filter Post with Taxonomy or Terms
Want a successful Modern site?
Start with IQRA training; it’s easy and quick to your needs.
Get Post by Term or Taxonom
1. get_post_by_tax($data)
Parametors
- id (term_id)
- permalink (term_permalink)
-
post_id (post_id)
-
query (term_query)
get_post_by_tax(array('query'=>'permalink="ecommerce"'));
2. fetch_terms()
Parametors
- id (term_id)
- permalink (term_permalink)
-
post_id (post_id)
-
query (term_query)
fetch_terms(array('post_id'=>'33'));
3. get_terms()
get terms via taxonomy
like: category name -> all terms
Parametors
-
pagination
-
search
- limit
-
taxonomy (required)
get_terms(array('taxonomy'=>'e-commerce'));
4. unlink_taxonomy()
Taxonomy / Term form post via post id
Parametors
id (required) (post_id)
unlink_taxonomy(array('id'=>'21'));