• Hi guys

    I’m trying to change the H1 tag in my header and the header image as well. I write a php condition tag and it doesn’t work for my posts, for pages works nicely.

    <?php if ( is_page('25')) : ?>
    page 25
    <?php elseif ( is_page('7')) : ?>
    page 7
    
    <?php elseif ( is_page('66')) : ?>
    Page 66
    
    <?php elseif ( is_page('22')) : ?>
    Page 22
    
    <?php elseif ( is_page('76')) : ?>
    Page 76
    
    <?php else : ?>Page
    <?php endif; ?>

    Page 66 is the post, i’ve tried with is_single and put the title and the slug in the () and it still doesn’t work. This is the first problem.

    I wanted to change the image header for each page but i don’t know how to make it work, i’m not a very advanced php user so its hard make it work.

    Thanks for the help guys

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Conditional tags for posts’ is closed to new replies.