Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   How to have only %image shown in several pages, while for the rest the complete thing (http://forum.bytesforall.com/showthread.php?t=12826)

levenssfeer Feb 16, 2011 05:44 AM

How to have only %image shown in several pages, while for the rest the complete thing
 
Hi,
Currently I have:
<?php if ((! is_page('page1')) and (! is_page('page2'))and (! is_page('page3'))) {echo '%logo %pages %image %cats' ; } ?>

but, I change my mind and want %image to be shown on those pages.
how to do this?

juggledad Feb 16, 2011 07:15 AM

I will assume you have this in the 'Configure Header Area' option' just change the statement
HTML Code:

%logo <?php if ((! is_page('page1')) and (! is_page('page2'))and (! is_page('page3'))) {echo ' %pages %image %cats' ; } ?>

levenssfeer Feb 17, 2011 02:11 AM

mmm, doesn't work, juggledad.... any changes after 'echo' actually affecting all other pages accept page1,2,3.

what I would like to have is to have banner image only at page1,2,3 and leave the other pages as it is now. It is quite confusing, actually....

juggledad Feb 17, 2011 03:43 AM

well you could use an else
HTML Code:

<?php if ((is_page('page1')) OR (is_page('page2')) OR (is_page('page3'))) {echo '%logo' ; }  else {echo '%logo %pages %image %cats' ;} ?>

levenssfeer Feb 18, 2011 02:10 PM

It works, thank you so much.
In addition to that I am wondering how to do this:
page1,2,3 show only %image
page 4 show no header at all
the rest show the complete thing

Thank you very very much in advance.


All times are GMT -6. The time now is 01:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.