• Hi,

    I have a category structure that for example goes:

    Home > Brands > Nike > Nike Golf Clubs > Post title (Single.php)

    The three pages leading up to the individual product (ie. single.php) are all controlled by category.php. The problem i have is that when im viewing the single page the breadcrumb will not show the page beforehand. Eg. it will only show:

    Home > Brands > Nike > Single.php

    it misses out the sub category ‘Nike Golf Clubs’.

    Could you offer any help in why this happens?
    Thanks for your time,
    Patrick.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Havlik

    (@mtekk)

    Is the post a member of Nike and Nike Golf Clubs? If so, Breadcrumb NavXT will pick the first hierarchy it finds, which probably happens to be the shorter Home > Brands > Nike > Post title one rather than the full one. Remember, since categories are hierarchical, having a post being a member of just Nike Golf Clubs will have it show up in the Nike Golf Clubs, Nike, and Brands archives; there is no need for it to be an explicit member of Nike Golf Clubs and Nike.

    Thread Starter paa1605

    (@paa1605)

    I see!

    Thanks for pointing that out. The only problem i have is that each product/post is categorised with both ‘Nike’ and ‘Nike Golf Clubs’ because on the ‘Nike’ page i show a selection of products that are in both the category of ‘best seller’ and the current category id (in this case ‘Nike’). If i only categorise the product by ‘best seller’ and ‘Nike Golf Clubs’ the query returns no results.

    I’m therefore guessing that i need to change the code so that my query asks to show posts in the category of ‘best seller’ and child of cat id. Is this correct?

    Thanks

    Plugin Author John Havlik

    (@mtekk)

    That seems to be on the correct path. You ran into the problem because you are directly making a query with a term id as a requirement. There should be some API functions that can give you the ids of all of the children categories, the you just feed them into the query.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Breadcrumb NavXT] Breadcrumb missing sub categories from trail’ is closed to new replies.