Support » How-To and Troubleshooting » ‘php if (is_404()) { ‘ question: don’t work

‘php if (is_404()) { ‘ question: don’t work

  • 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

Viewing 1 replies (of 1 total)
  • 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?

Viewing 1 replies (of 1 total)
  • The topic ‘‘php if (is_404()) { ‘ question: don’t work’ is closed to new replies.
Skip to toolbar