Support » Theme: Tiny Forge » How to remove nav bar to one page only.

  • Resolved wilsonavina

    (@wilsonavina)


    Hi,
    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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]
    </nav>
    <?php } ?>

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

    This is not tested.

    Thanks for your reply. I will try it!

    Theme Author Tomas Mackevicius

    (@tomasm)

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

    How to use Tiny Framework and its child themes: a comprehensive guide

    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 😉

    Its work! Your a genius! Thank You Tomas!
    wilsonavina.com/thankyou

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to remove nav bar to one page only.’ is closed to new replies.