0

I've run into a bit of a tricky problem that I'm probably over thinking. I need to be able to display different css depending on what campaign page the user has come from.

To better illustrate:

Campaign 1 \
Campaign 2 ----> Information or css  ----> page
Campaign 3 /

I hope this is understandable.

1 Answer 1

0

WordPress has a function called wp_get_referer() that you could use to do this. Codex link

$page_referrer = wp_get_referer();
if ( $page_referrer == 'campaign-1-url') {
    // Campaign 1 css
}

You'll have to craft the conditional statement to fit yours needs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.