multiple categories and breadcrumbs problem

Let me explain my problem.
I have this post that uses multiple categories…
and categories are being shown as breadcrumbs

I there a way where I can display 1 specific tree?

Read More

example I have

game > basketball > teams > team A > players > player1

and

announcement > new players > player1

Now, when I browse game going deep to player1 I will have that first example as my breadcrumb for that page.
But, navigating through announcement going deep to player1 will also give that kind of breadcrumb. Is there a way to achieve getting the second breadcrumb?

even using /%category%/%postname%/ as permalink, the url will only use one specific…

like game/basketball/teams/team A/players/player1/

well it’s like this,

1st: announcement/

clicking new players: announcement/new players/

after clicking player1: game/basketball/teams/team A/players/player1/

why can’t I continue as announcement/new players/player1/ ?

and announcement > new players > player1 ?

Related posts

Leave a Reply

2 comments

  1. To answer your question, it doesn’t matter from where you’re going to player1. HTTP being a stateless protocol, doesn’t care if you’re going from announcements or teams or even if by typing directly to the address bar. So what you’re asking is not possible without some kind of coding

    Now when we have the same content at 2 different urls, wordpress favors just one of those urls & that is a very good thing if you ask me, else search engines will penalize your site for duplicate content.

    I recommend leaving it as it is, but if you just want to do it no matter what, you’ll need to store the previous pages information somewhere(typically a cookie or session variables). Then you’ll need to use this information together with your breadcrumbs generating code in your theme to favor one of the trees.

  2. I think it can be done by making get_permalink() to generate links based on context in which they are displayed. If wordpress redirects you to the canonical URL from that post, there probably a plugin which stops it like http://wordpress.org/extend/plugins/disable-canonical-url-redirects.

    Now breadcrumb don’t realy tell you how you got to that page, but rather how you might have got there. If there are several possible paths then you should simply show all of them (most of the time people will get to the post from google so there is no real breadcrums in any case).