mardi 3 janvier 2017

If statement in php Wordpress for option to have a light or dark view?

I currently have a slider on my home page and want to give the option to have a light or dark version. So when they press light the navigation will be white where as when they choose dark the arrows will be a dark colour depending on the slider image behind.

My code is using the acf repeater:

If ( have_rows('slides', 'option') ): While (have_rows('slides, 'option') ): the_row();

Then obviously put in my the_sub_field where I want them

Aucun commentaire:

Enregistrer un commentaire