从附件中删除横幅,以及在Wordpress中删除特定页面

I have a function that will add a banner ad to my page:

<?PHP tfuse_top_adds();?>

Now, I have tried to place to this banner on all pages, except attachments, and a specific page ID. When I add the code:

<?PHP if(!is_attachment()) {tfuse_top_adds();} ?> 

all is well, no ad on the attachment pages. When I add the code:

<?PHP if(!is_page( 9000 )) {tfuse_top_adds();} ?>

all is well, no ad on page 9000. However, when I try to combine the two conditions:

<?PHP if(!is_attachment() || !is_page( 9000 )) {tfuse_top_adds();} ?>

the ads are not removed from the page, or the attachement. Ive tried a few iterations here too, and can't seem to hack it. Any suggestions on how to write this statement is appreciated.

You need an and, not an or.

<?PHP if(!is_attachment() && !is_page( 9000 )) {tfuse_top_adds();} ?>

With your current code, one of !is_attachment() and !is_page(9000) will always be true, and with an or, that means the whole statement evaluates to true.