WordPress.org

Ready to get started?Download WordPress

Forums

Easiest way to switch CSS styles? (4 posts)

  1. lowwa
    Member
    Posted 3 years ago #

    Hey guys, client wants his affiliates to be able to link to his homepage, and have the homepage change background color and logo depending on which affiliate's link lead the visitor to arrive on his homepage.

    What is the easiest way to do this?

    I think something like this is needed, but I'm not sure how to implement it best:

    example.com/?tim.css
    example.com/?sara.css

    Can you please offer some suggestions? Thank you.

  2. lowwa
    Member
    Posted 3 years ago #

    Anyone? Cheers.

  3. borantula
    Member
    Posted 3 years ago #

    never tried it but you might think of using the cookies for this.
    write a functions for writing data to section according to affiliate link, then a function for checking the session and choosing right css.

    in fact this thing can be turned into a plugin which has a settings page and etc.

    i might suggest the session as well but as i remember an article about wordpress encourages using of cookies instead of session.(correct me if i'm wrong, i'm not sure about this 100 percent)

  4. lowwa
    Member
    Posted 3 years ago #

    Thanks for your suggestion mate.

    I found an old plugin called "setCSS" but it is outdated and the developer's homepage is now blank.

    He used function like example.com/?id=123

    And the domains simply forwarded to the correct id.

    Unfortunately I'm not a coder and this is a little beyond me...

Topic Closed

This topic has been closed to new replies.

About this Topic