Forums

Custom sidebar depending on referral page (4 posts)

  1. trixienolix
    Member
    Posted 1 year ago #

    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

  2. t-p
    Member
    Posted 1 year ago #

    see if any of these plugins can do what you have in mind.

  3. trixienolix
    Member
    Posted 1 year ago #

    hmm, i've had a quick scan but these just do what I've already done i.e. enable me to have different sidebars on different pages depending on the id, parent page or category. I can't see that any of them enable me to have different sidebars based on the referral page... i'll double check.

  4. trixienolix
    Member
    Posted 5 months ago #

    I'm still looking for a solution to this - does anyone have an answer? Is there anyway I can use a custom link... something like shared1?cat=12 ??

    Can anyone help?

Topic Closed

This topic has been closed to new replies.

About this Topic