Custom sidebar depending on referral page
-
I need a way to serve up custom sidebar content depending on the page you’ve just come from.
e.g. i have 2 sections called “SECTION A” and “SECTION B” and each of these have subpages: sectiona_subpage1, sectiona_subpage2 etc and sectionb_subpage1, sectionb_subpage2.
Depending on which section you are in, you get served up different sidebar content.All this is fine.
However a new page has come up, lets call it “shared1”. This page is linked to from both “SECTION A” and “SECTION B” and their subpages. So when i’m on sectiona_subpage1 and i go to shared1 i want the “SECTION A” sidebar content to show up. Likewise when i’m on sectionb_subpage1 and i go to shared1 i want the “SECTION B” sidebar content to show up.
This has stumped me. Is there a conditional tag that looks at the referral page?
e.g if is_referral_page (’42’) ……
thanks in advance
- The topic ‘Custom sidebar depending on referral page’ is closed to new replies.