Tiny Forge
[resolved] How to remove nav bar to one page only. (5 posts)

  1. wilsonavina
    Posted 1 year ago #

    Is anybody know how to remove a navi bar to one page only?
    I use one page for Thank you page and would like to remove the nav bar on this page only.
    will greatly appreciate any suggestion.

  2. Dennis Barber
    Posted 1 year ago #

    This will take a bit of altering your theme code.

    Before altering your website/theme, it is highly encouraged to create and activate a child theme if you have not done so already.

    Once that is done, copy the header.php file to your child theme folder. Using a text editor, open your newly copied header.php file and surround your navigation bar code in a "if not 'thank-you' page" conditional statement. More details on this can be found here. It will look something like this (assuming your page is titled 'thank-you' if it is not, use what your page is titled):

    <?php if(!(is_page('thank-you'))) { ?>
    <nav ... >
    [navigation bar code]
    <?php } ?>

    This will show your navigation bar on all pages except your thank-you page.

    This is not tested.

  3. wilsonavina
    Posted 1 year ago #

    Thanks for your reply. I will try it!

  4. Tomas Mackevicius
    Theme Author

    Posted 1 year ago #

    With Tiny Forge it should be even easier, because it uses extended body classes:


    So you could just add this to style.css:

    .page-thank-you #site-navigation {
        display: none;

    thank-you is your page slug. You can see your site's source to see all body classes that get generated by WP.

    Don't forget to share your results with us ;)

  5. wilsonavina
    Posted 1 year ago #

    Its work! Your a genius! Thank You Tomas!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic


No tags yet.