Skip to content

Instantly share code, notes, and snippets.

Avatar

Biraj Pandey developeryamhi

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am developeryamhi on github.
  • I am developeryamhi (https://keybase.io/developeryamhi) on keybase.
  • I have a public key ASADEYh4E9dWB4h8JZiODgbUhksPX6ts7H4XvszeGJdFNAo

To claim this, I am signing this object:

@developeryamhi
developeryamhi / connected_taxonomies
Last active Aug 29, 2015
Get the Connected Taxonomies in WordPress
View connected_taxonomies
// Get the Connected Taxonomies via Posts
function get_the_connected_taxonomies($tax_name, $rel_tax_type = 'post_tag', $tax_type = 'category', $post_type = 'post', $from_cache = true, $search_key = 'slug') {
// Transient Key
$transient_key = $post_type . '-' . $rel_tax_type . '-' . $tax_type . '-' . $tax_name . '-cache';
// Check
if($from_cache && get_transient($transient_key)) {
// Return