WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Network Shared Posts] Works only for categories and posts – changed that – code submission

[Plugin: Network Shared Posts] Works only for categories and posts – changed that – code submission

  • Hey,

    in network-shared-posts.php in line #149 you’re binding the request to only taxonomies ‘category’ and ‘post_tag’ – but there might be more if you’re working with custom post types and custom taxonomies.

    so changing that line from
    $tax_id = $wpdb->get_var( $wpdb->prepare( “SELECT term_taxonomy_id FROM $TermTaxonomyTable WHERE (taxonomy = ‘category’ OR taxonomy = ‘post_tag’) AND term_id = $cat_id” ) );

    to
    $tax_id = $wpdb->get_var( $wpdb->prepare( “SELECT term_taxonomy_id FROM $TermTaxonomyTable WHERE term_id = $cat_id” ) );

    works with all post-types and taxonomies 🙂

    rico

    http://wordpress.org/extend/plugins/network-shared-posts/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Network Shared Posts] Works only for categories and posts – changed that – code submission’ is closed to new replies.