is_page doesn't work
-
I’m trying to have an image change in my header.php on the blog page.
I got this. I looked at other topics as well and I’m pretty certain this is correct however it only shows the image in the else never the first image.<?php if ( is_page( 'blog' ) ) { echo '<img src="link1" alt="alt-text">'; } else { echo '<img src="link2" alt="alt-text">'; } ?>What am I doing wrong? Why isn’t it working?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘is_page doesn't work’ is closed to new replies.