Multiple banners PHP
-
Hi, I’m pretty new at PHP.
I have 6 pages that have custom banners I have added them like so:
<?php if (is_page ( 'Homepage' )) {echo '<img id="banner" src="banner1.png" />'; } <?php if (is_page ( 'About' )) {echo '<img id="banner" src="banner2.png" />'; }
Now I want to make it so every other page or post on the site shows Banner1.png:
<?php {echo '<img id="banner" src="https://www.anaverzone.com/wp-content/uploads/2014/04/banner1.png" />'; }
But this creates 2 banners one over top of the other.
Not sure how to do this, suggestions would be appreciated ??
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Multiple banners PHP’ is closed to new replies.