Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now
2 small grammar correction
source | link

I've got some code I want to run on every page other than the blog page and the archive page.

If I use

<?php if ( !is_home() )  { ?>

The code correctly doesn't show on the blog page.

If I use

<?php if ( !is_page('archive') )  { ?>

The code correctly doesn't show on the archive page.

But if I use

<?php if ( !is_home() || !is_page('archive') )  { ?>

The code incorrectly shows up on both the pages.

Any ideas onsuggestion what I'm doing wrong?

I've got some code I want to run on every page other than the blog page and the archive page.

If I use

<?php if ( !is_home() )  { ?>

The code correctly doesn't show on the blog page.

If I use

<?php if ( !is_page('archive') )  { ?>

The code correctly doesn't show on the archive page.

But if I use

<?php if ( !is_home() || !is_page('archive') )  { ?>

The code incorrectly shows up on both the pages.

Any ideas on what I'm doing wrong?

I've got some code I want to run on every page other than the blog page and the archive page.

If I use

<?php if ( !is_home() )  { ?>

The code correctly doesn't show on the blog page.

If I use

<?php if ( !is_page('archive') )  { ?>

The code correctly doesn't show on the archive page.

But if I use

<?php if ( !is_home() || !is_page('archive') )  { ?>

The code incorrectly shows up on both the pages.

Any suggestion what I'm doing wrong?

1
source | link

Trouble with conditional tags

I've got some code I want to run on every page other than the blog page and the archive page.

If I use

<?php if ( !is_home() )  { ?>

The code correctly doesn't show on the blog page.

If I use

<?php if ( !is_page('archive') )  { ?>

The code correctly doesn't show on the archive page.

But if I use

<?php if ( !is_home() || !is_page('archive') )  { ?>

The code incorrectly shows up on both the pages.

Any ideas on what I'm doing wrong?