Support » Fixing WordPress » Day based video background

  • I am looking to show a different background video dependent on the day of the week, or even just randomized per visit. Ideally I’d use a plugin but I can’t find anything that does this. Any tips on how to make this happen otherwise?

Viewing 1 replies (of 1 total)
  • The answer pretty much depends on if there’s already a video and you just want to change the source of it or create your own <video> from scratch etc. You could also go through js/jquery or php if you’re making it fully custom.

    For example if you want to create your own an easy ( and readable ) way to do it with php is by:

    $day = date( 'w' );
    if ( '1' === $day ) {
    	echo 'monday';

    Where Sunday = 0, Monday = 1 so on so forth, and you simply echo your video url or code etc ( you decide that ).

    You’re not giving much details to be honest to help further :]. If there’s a page with a video already on it and you want to change it’s source a link would help a lot to see how the theme is set up etc to give you a possible solution.

Viewing 1 replies (of 1 total)
  • The topic ‘Day based video background’ is closed to new replies.