Skip to content

Instantly share code, notes, and snippets.

View developeryamhi's full-sized avatar

Biraj Pandey developeryamhi

View GitHub Profile

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 August 29, 2015 14:16
Get the Connected Taxonomies in WordPress
// 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