WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#17539 closed enhancement (invalid)

category-template improve for custom taxonomies?

Reported by: unsalkorkmaz Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.2
Component: General Keywords:
Focuses: Cc:

Description

I was trying to use json-api plugin but there was problem with custom taxonomies. I saw they found a fix but that needs to edit core files:
http://wordpress.org/support/topic/plugin-json-api-querying-custom-taxonomy-on-custom-post-type-causes-fatal-error

I got custom code to retrieve custom taxonomy, I added this piece code to the file category-template.php line 95

// $categories = wp_get_object_terms( $id, 'category' );
// CHANGE TO
$args = array('public' => true);
$output = 'names'; // or objects
$operator = 'and'; // 'and' or 'or'
$taxonomies = get_taxonomies($args, $output, $operator);

$categories = wp_get_object_terms( $id, $taxonomies);
// END

i dont want to edit core files but is there any chance to put this change for wp3.2?

Change History (1)

comment:1 @nacin4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

See my comment on the support forum.

Note: See TracTickets for help on using tickets.