wordpress - Statement not working -


i have following statement

<?php if (!is_page('home')) {  ?> <div id="grey-bar"> <h1><?php the_title(); ?></h1> </div> <?php }  ?> <?php if (is_single()) { ?> <div id="grey-bar"> <h1>blog</h1> </div> <?php } ?>    

the first part ok, second part not remove php tag the_title part, adds word blog after post title. how remove the_title , replace blog?

thanks

if page not home page, can single page. way logic structured, both clauses execute.

you looking this:

<?php if (!is_page('home')): ?> <div id="grey-bar"> <h1><?php the_title(); ?></h1> </div> <?php elseif (is_single()): ?> <div id="grey-bar"> <h1>blog</h1> </div> <?php endif; ?>  

the bracket syntax work too, easier read when embeded html.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -