Return to Support

Can I programmatically change the background image for a site?

Home Forums Graphene WordPress theme Support Can I programmatically change the background image for a site?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #9650

    My website is for a church and I was hoping to programmatically change the background image on certain dates of the year (e.g., Christmas = White, Lent = Purple, Epiphany = Green, etc.). I have all of the images lined up and available and can use “crontrol” to execute the custom code, but I would like to know what PHP code might be used to change the Graphene background’s image. I tried using set_theme_mod, but it ended up blowing up all of my Graphene settings (although it did successfully change the background, just not according to Graphene). Does anyone have any ideas?

    #44227
    sanuja.com
    Participant

    Sorry, this is not related to the question you asked. But I just visited http://www.redeemersouthhills.org/ and found that it goes into the mobile version (Neo) even when I am on a desktop. Only on the home page. You may want to look into this; the mobile preview is ON or something?

    #44228
    Quote:
    what PHP code might be used to change the Graphene background’s image.

    Why bother with PHP? This is the sort of thing that JavaScript was built for: grab the user’s (not the server’s) date, evaluate it, and document.write a bit of css to set the background.

    Moved to Support. Please post in the correct section next time.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.