Replace image on several pages with PHP or CSS?
-
My client’s site has the same background photo on every page. He wants several pages to show an alternate photo. These are displayed via a custom slider rather than conventional markup. I have tried both CSS and PHP, each using the page ID. No luck. With CSS and the !important workaround, the correct replacement image would show up in the right-hand panel of Chrome’s development tools, but for some reason not display on the page. Hard refresh did not work. Any tips?
<div id="herowrap"> <div id="hero" class="cycle-slideshow hidden-phone" data-cycle-log="false" data-cycle-fx="fade" data-cycle-speed="800" data-cycle-timeout="8000" data-cycle-pause-on-hover="false" data-cycle-pager="#heronav" data-cycle-next="#next" data-cycle-prev="#prev" data-cycle-slides="> div" data-cycle-pager-template="<a href=#> {{slideNum}} </a>" style="position: relative;"> <div class="slide cycle-slide cycle-sentinel" style="position: static; top: 0px; left: 0px; z-index: 99; opacity: 1; display: block; visibility: hidden;"> <img src="https://client-name.com/wp-content/uploads/2016/08/image_to_replace.jpg" class="img-responsive" style="visibility: hidden;"></div><div class="slide cycle-slide cycle-slide-active" style="position: absolute; top: 0px; left: 0px; z-index: 99; opacity: 1; display: block; visibility: visible;"> <img src="https://client-name.com/wp-content/uploads/2016/08/image_to_replace.jpg" class="img-responsive"> </div> </div> </div>
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
The topic ‘Replace image on several pages with PHP or CSS?’ is closed to new replies.