[resolved] Allow visitors to choose background color (4 posts)

  1. Benjamin_SP
    Posted 6 years ago #

    Right now my site has a pretty light background, a lot of people may prefer a darker one so I want to allow my visitors (through the click of a link) to be able to toggle between the light and dark backgrounds.

    Of course there needs to be a cookie set so when the visitor goes to a new page on the site he/she doesn't need to click the toggler link all over again.

    How can I do this, I just want to change the CSS background color - I don't need to use an image.

  2. The5sisters
    Posted 6 years ago #

    Quite tricky.A possible solution might be to have a separate css file outside your theme folder and a php file that can call on one or the other css file via a user input .I think you either have to call on a programmer to create such a plug-in like "MaxBlogPress" or choose a background that most users will be happy with.
    There is an accessibility work around that I have heard about ,only, but you would need further research.
    A php right inside the css file is workable, to give alternate colors on input.
    Again ask someone who can write that php file for you.
    Remember to always make a backup copy of your css file before changing anything,using copy/paste or FTP download.

  3. The5sisters
    Posted 6 years ago #

    Found perfect solution.WPChameleon plug-in.After installing ,leave first field blank on plug-in's edit page and insert body background css into second field
    Apparently a 'Change Background' option link appears on the home page.Whether it creates a cookie for individual users I don't know.
    The plug-in is available via dashboard 'Add New' plug-inand search by name

  4. Benjamin_SP
    Posted 6 years ago #

    Thank you so much The5sisters!!! I just saw your post after being away a while and it was the perfect solution. Now my visitors are able to choose a background with a single click. I'm not sure if it leaves a cookie but the color remains even when the visitor goes to different pages which is good enough.

    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Topic