Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #12396

    Hi all! i have a question. I want to remove the adsense banner from the header of my 404.php page, becase is an error page and the adsense ad is not good here. But i’ve put the ad on the header, is possible to remove the ad from my 404 page? i have to copy/paste the header code instead of get_header?

    here my 404.php

    global $k_option;

    $k_option['custom']['bodyclass'] = ""; // $k_option['custom']['bodyclass'] = "class='fullwidth'";
    get_header(); ?>

    <div id="main">
    <div id="content">

    <div class='entry'>
    <h2>ERRORE 404</h2>
    <h4>Spiacenti, ma la pagina non esiste, o meglio, questa pagina esiste... ma questa è una pagina d'errore, non quella che hai cercato</h4>
    <p>Puoi provare ad usare il modulo di ricerca oppure navigare le categorie nel Menu</p>
    </div><!--end entry-->

    <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
    <div><input type="text" class='rounded' value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" />
    <input type="submit" class="button ie6fix" id="searchsubmit" value="Cerca Nel Sito" />
    </div><!-- end content -->

    </div><!--end main-->

    <?php get_footer(); ?>

    another question… my is born with the sidebar, i’ve removed it, but all the text is alligned to the right side of the page, i’ve tried to use the class=fullwidth on line 4 of 404.php but nothing change.. have you some ideas?



    Kindly add this code in your style.css(located inside the display folder):

    .error404 > div.adv > center {
    display: none;
    .error404 #content {
    float: left!important;

    Hope this helps. :)




    mmmm is not work.. ive added it to my style.css file (on 1st line).. adv and text are in the same place. Is possible that the class .error404 has another name?



    That’s the class of the body in every 404 page. I checked your site and looked for style.css and check the code and I couldn’t see the code that I have given above.




    you not see the code because i’ve removed it… now i’ve re-added it to style.css


    Hi heavymetaller,

    It looks like the banner is gone on your 404 page now with the inclusion of the CSS from Ismael.

    Let us know if you have any other issues that you need support on :)




    now… like a magic.. IT WORK! probably it was my browser cache… thanks a lot for the support! have a great day guys!!


    Sometimes that happens :)

    Just glad its working for you now!

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Removing some header code on some page’ is closed to new replies.