<?php
if(is_page('64'))
{ ?>
blah-blah
<?php
}
elseif(is_page('archive'))
{ ?>
blah-blah
<?php
}
elseif(is_page_template('archives.php'))
{ ?>
blah-blah
<?php
} ?>
You were missing the single quotes on the first check. I also formatted the code and put in some else statements..
Unless you need more then one of those statements to return true and display 2 lots of content if 2 are matched, in which case switch back to IFs only..
This doesn’t work as well.
Are conditional tags supposed to work in sidebar at all?
Please can you tell me what am I doing wrong?
All of those examples should work fine.
The problem is probably with a query somewhere on your page. Add this to the bottom of your archives.php
page template and see if it helps:
<?php wp_reset_query(); ?>
Make sure it comes before any calls to the sidebar.
wp_reset_query() worked.
Thanks a lot!