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

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -