• Resolved icec

    (@icec)


    Hello,

    I would like to remove the header and footer from a single page.

    I have tried various options, adapting previous answers from this forum and with various combinations of scripts, but I am stuck and would really appreciate some help.

    Do I need to change the header.php or the page.php? or something else?

    Many thanks in advance.

Viewing 8 replies - 16 through 23 (of 23 total)
  • Elizool99,

    Sorry Eli. I am not as smart as you. I really need it spelled out for me with the actual code. As I said in my first post I really need the hand holding. I need to know the exact code to write and where to place it in the header.php

    Thanks for your patience,

    Jeff

    Anyone else have any ideas?

    I am thoroughly confused.
    Everything I try brings down the entire site.
    Jeff

    What exactly do you want to exclude from the header and footer, if you conditionalise them out, you’ll not have a complete document, since the primary HTML markup is missing, notably the opening/closing HTML and BODY tags.

    What you should do is open up both the header.php and footer.php, and place these two pieces of code around the code you want to conditionally disable for a set page.. (1 is an example ID)

    <?php if( !is_page( '1' ) ) : ?>

    and

    <?php endif; ?>

    Which basically means, when it’s not a page with the ID 1, then execute the code… (so basically it’s not shown if it is page with an ID of 1).

    This is exactly what esmi was suggesting in her response.

    If you can’t manage it, open the 2 files (header and footer), and paste them into individual pastebins, and post the links back here, and i’ll write in the conditions for you… ??

    Here is my header.php

    This is my website.

    I want to keep the header image from displaying on my “Gallery” page.

    Jeff

    Try changing:

    div id="banner">
                                                   <!-- Flashfader -->
    	               <?php include (ABSPATH.'wp-content/flashfader/flashfaderhtml.txt'); ?>
    	              <!-- /Flashfader -->
                <if(is_page_id=10) then display; none>
    
    		</div>

    to:

    <?php if( !is_page('10') ) :?>
    div id="banner">
                                                   <!-- Flashfader -->
    	               <?php include (ABSPATH.'wp-content/flashfader/flashfaderhtml.txt'); ?>
    	              <!-- /Flashfader -->
    		</div>
    <?php endif;?>

    esmi,

    That is one spooky avatar and you are one smart cookie!

    Bless you!

    Thank you so much! Wow! I was not going to figure that out on my own.
    You rock!

    Jeff

    Glad to hear that it’s working now. ??

    Esmi!
    Seems like you solved cyberbronco’s query. I think I have a similar query. my website is https://www.sheareaseltd.com I would like to remove the header above my links/navigation. Obviously I dont want to dlete all the info in the html header but I want to see what it would look like without that dopy box. Also is it possible to remove the right column?

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘How to Remove header and footer from a single page?’ is closed to new replies.