I'm trying out the latest svn and I've noticed the breadcrumb
plugin<http://www.thedevproject.com/projects/wordpress-breadcrumb-plugin/>has
stopped working when ever a person views a category page. It still
functions correctly on archives, dates, search, etc...

Examples:

My games cat on 2.2 shows as Hotelblues.com »
Games<http://www.hotelblues.com/cat/games/>
In 2.3 it shows up as Hotelblues.com »<http://beta.hotelblues.com/cat/games/>

I believe it has something to do with the changes to categories. But I have
no real knowledge of php to really figure it out on my own. I think it's the
below code that is at fault:

function get_breadcrumb_category($breadcrumb, $params)
{
  global $wp_query;

  if ($wp_query->is_category)
  {
    $object = $wp_query->get_queried_object();

    // Parents.
    $parent_id  = $object->category_parent;
    $parents    = array();
    while ($parent_id)
    {
      $category   = get_category($parent_id);

      if ($params["link_none"])
        $parents[]  = $category->cat_name;
      else
        $parents[]  = '<a href="'.get_category_link($parent->term_id).'"
title="'.$parent->cat_name.'">'.$parent->cat_name.'</a>';

      $parent_id  = $category->category_parent;
    }

    // Parents were retrieved in reverse order.
    $parents    = array_reverse($parents);
    $breadcrumb = array_merge($breadcrumb, $parents);

    // Current category.
    if ((breadcrumb_is_paged() || $params["link_all"]) &&
!$params["link_none"])
      $breadcrumb[] = '<a href="'.get_category_link($object->cat_ID).'"
title="'.$object->cat_name.'">'.$object->cat_name.'</a>';
    else
      $breadcrumb[] = $object->cat_name;
  }

  return $breadcrumb;
}


Any ideas what I need to do to make this code work?
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers

Reply via email to