'php if (is_404()) { ' question: don't work (2 posts)

  1. elyonline
    Posted 10 years ago #

    Hi there,

    Just had a lenghty chat on the WP IRC about this an d we didn't come to any conclusions.

    I am using this '<?php if (is_404()) { ?>' to pull in a sidebar specific to my 404.php page but it does not pull the correct sidebar. Instead it pulls my '<?php if (is_single()) { ?>' sidebar instead.

    Is there a problem with WP that currently not allow 404.php to use that coding?

    This is my complete sidebar.php: http://phpfi.com/62879

  2. angelmax
    Posted 9 years ago #

    I found that the function is_404() is not working for me neither. I am using wordpress 2.01 and I am using the function is_404() inside the sidebar.php outside of the loop the esclude the display of Google Adsense on an error page.

    But id didn't work. I had to hard code the sidebar.php and remove the Google Adsense code.

    Any hints?

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.